Examples of ImageInputStreamSpi


Examples of javax.imageio.spi.ImageInputStreamSpi

            if(configHandler.getCachedReaderSPI() == null){
                // Get the URL associated to the file
                URL granuleUrl = DataUtilities
                        .fileToURL(fileBeingProcessed);
                // Get the ImageInputStreamSPI associated to the URL
                ImageInputStreamSpi inStreamSpi = Utils.getInputStreamSPIFromURL(granuleUrl);
                // Ensure that the ImageInputStreamSPI is available
                if(inStreamSpi==null){
                    throw new IllegalArgumentException("no inputStreamSPI available!");
                }
                ImageInputStream inStream=null;
                try{
                    // Get the ImageInputStream from the SPI
                    inStream = inStreamSpi
                            .createInputStreamInstance(granuleUrl, ImageIO.getUseCache(),
                                    ImageIO.getCacheDirectory());
                    // Throws an Exception if the ImageInputStream is not present
                    if(inStream == null){
                        if(LOGGER.isLoggable(Level.WARNING)){
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

     * Reads an image from a GeoTIFF file. For more information, see
     * <a href="http://download.java.net/media/jai-imageio/javadoc/1.1/com/sun/media/jai/operator/ImageReadDescriptor.html#RenderedMode">ImageReadDescriptor</a>
     */
    private static synchronized RenderedImage readImage(File inFile) throws IOException {
        final ParameterBlock readParams = new ParameterBlock();
        ImageInputStreamSpi lSpi = ImageIOExt.getImageInputStreamSPI(inFile);
        PlanarImage lImage = null;
        ImageInputStream lImgIn =
            lSpi.createInputStreamInstance(inFile, false, null);
        readParams.add(lImgIn);
        readParams.add(0);
        readParams.add(Boolean.FALSE);
        readParams.add(Boolean.FALSE);
        readParams.add(Boolean.FALSE);
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.