Package javax.imageio.stream

Examples of javax.imageio.stream.FileImageInputStream


    public ImageInputStream createInputStreamInstance(Object input,
                                                      boolean useCache,
                                                      File cacheDir) {
        if (input instanceof RandomAccessFile) {
            try {
                return new FileImageInputStream((RandomAccessFile)input);
            } catch (Exception e) {
                return null;
            }
        } else {
            throw new IllegalArgumentException
View Full Code Here


    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (RandomAccessFile.class.isInstance(input)) {
            return new FileImageInputStream((RandomAccessFile) input);
        }
        throw new IllegalArgumentException(Messages.getString("imageio.95"));
    }
View Full Code Here

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (File.class.isInstance(input)) {
            return new FileImageInputStream((File) input);
        }
        throw new IllegalArgumentException(Messages.getString("imageio.84"));
    }
View Full Code Here

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (RandomAccessFile.class.isInstance(input)) {
            return new FileImageInputStream((RandomAccessFile) input);
        }
        throw new IllegalArgumentException(
                "input is not an instance of java.io.RandomAccessFile");
    }
View Full Code Here

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (File.class.isInstance(input)) {
            return new FileImageInputStream((File) input);
        }
        throw new IllegalArgumentException("input is not an instance of java.io.File");
    }
View Full Code Here

      if (imageCache.get(path) != null)
        buffImage = (BufferedImage)imageCache.get(path);
      else
      {
        System.out.println("Loading image:"+path);
        buffImage = ImageIO.read(new FileImageInputStream( new File(path)));
        imageCache.put(path, buffImage);
      }
    }
    catch (IOException e)
    {
View Full Code Here

      if (imageCache.get(path) != null)
        buffImage = (BufferedImage)imageCache.get(path);
      else
      {
        System.out.println("Loading image:"+path);
        buffImage = ImageIO.read(new FileImageInputStream( new File(path)));
        imageCache.put(path, buffImage);
      }
    }
    catch (IOException e)
    {
View Full Code Here

        InputStream is=null;
        javax.imageio.stream.ImageInputStreamImpl iis=null;
      try {
         
          if(source instanceof File) {
        iis=new FileImageInputStream((File) source);
      }
      else if(source==null)iis=new MemoryCacheImageInputStream(new ByteArrayInputStream(getImageBytes(format,true)));
      else iis=new MemoryCacheImageInputStream(is=source.getInputStream());
     
            Iterator<ImageReader> readers = ImageIO.getImageReaders(iis);
View Full Code Here

        int height = 0;
        String name = null;
        try {
            File file = new File(path);
            name = file.getName();
            reader.setInput(new FileImageInputStream(file), true);
            width = reader.getWidth(0);
            height = reader.getHeight(0);
           
        } catch (IOException e) {
            System.out.println("KartePane.java: " + e);
View Full Code Here

    @Override
    public ImageInputStream createInputStreamInstance(Object input, boolean useCache,
            File cacheDir) throws IOException {
        if (RandomAccessFile.class.isInstance(input)) {
            return new FileImageInputStream((RandomAccessFile) input);
        }
        throw new IllegalArgumentException(
                "input is not an instance of java.io.RandomAccessFile");
    }
View Full Code Here

TOP

Related Classes of javax.imageio.stream.FileImageInputStream

Copyright © 2018 www.massapicom. 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.