Examples of FileCacheImageInputStream


Examples of javax.imageio.stream.FileCacheImageInputStream

        throws IOException {
        if (input instanceof InputStream) {
            InputStream is = (InputStream)input;

            if (useCache) {
                return new FileCacheImageInputStream(is, cacheDir);
            } else {
                return new MemoryCacheImageInputStream(is);
            }
        } else {
            throw new IllegalArgumentException();
View Full Code Here

Examples of javax.imageio.stream.FileCacheImageInputStream

      InputStream inStream =
    Channels.newInputStream((ReadableByteChannel)input);

      if(useCache) {
    try {
        stream = new FileCacheImageInputStream(inStream,
                 cacheDir);
    } catch(IOException e) {
        // Cache file could not be created.
    }
      }
View Full Code Here

Examples of javax.imageio.stream.FileCacheImageInputStream

 
  //TODO Handling Bump .. currntly it supports only ARGB colors
  public IBitmap DecodeToIBitMap(byte[] encoded) throws Exception{
    ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
    ImageReader reader = (ImageReader) ImageIO.getImageReadersByFormatName("jpeg2000").next();
    FileCacheImageInputStream fileImageOutputStream = new FileCacheImageInputStream(bais, null);
    reader.setInput(fileImageOutputStream);
    BufferedImage img = reader.read(0);
    bais.close();
//   
//    ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.