Package javax.imageio.stream

Examples of javax.imageio.stream.ImageInputStream.reset()


            boolean supported = false;
            if (magic == 0xC6D3D0C5L) {
                supported = true; //binary EPS

                binaryHeader = readBinaryFileHeader(in);
                in.reset();
                in.mark(); //Mark start of file again
                in.seek(binaryHeader.psStart);
               
            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
View Full Code Here


                in.mark(); //Mark start of file again
                in.seek(binaryHeader.psStart);
               
            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
                in.reset();
                in.mark(); //Mark start of file again
            } else {
                in.reset();
            }
           
View Full Code Here

            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
                in.reset();
                in.mark(); //Mark start of file again
            } else {
                in.reset();
            }
           
            if (supported) {
                ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_EPS);
                boolean success = determineSize(in, context, info);
View Full Code Here

            }
           
            if (supported) {
                ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_EPS);
                boolean success = determineSize(in, context, info);
                in.reset(); //Need to go back to start of file
                if (!success) {
                    //No BoundingBox found, so probably no EPS
                    return null;
                }
                if (in.getStreamPosition() != 0) {
View Full Code Here

                        "ImageLoader doesn't support multiple strips");
            }
            stripOffset = dir.getField(TIFFImageDecoder.TIFF_STRIP_OFFSETS).getAsLong(0);
            stripLength = dir.getField(TIFFImageDecoder.TIFF_STRIP_BYTE_COUNTS).getAsLong(0);
        } finally {
            in.reset();
        }

        in.seek(stripOffset);
        InputStream subin = new SubInputStream(ImageUtil.needInputStream(src), stripLength, true);
        if (fillOrder == 2) {
View Full Code Here

                        firstException = null; //Clear exception after successful fallback attempt
                        break;
                    } catch (IIOException iioe) {
                        //ignore
                    }
                    imgStream.reset();
                } finally {
                    reader.dispose();
                }
            }
        } finally {
View Full Code Here

            boolean supported = false;
            if (magic == 0xC6D3D0C5L) {
                supported = true; //binary EPS

                binaryHeader = readBinaryFileHeader(in);
                in.reset();
                in.mark(); //Mark start of file again
                in.seek(binaryHeader.psStart);

            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
View Full Code Here

                in.mark(); //Mark start of file again
                in.seek(binaryHeader.psStart);

            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
                in.reset();
                in.mark(); //Mark start of file again
            } else {
                in.reset();
            }
View Full Code Here

            } else if (magic == 0x53502125L) { //"%!PS" in little endian
                supported = true; //ascii EPS
                in.reset();
                in.mark(); //Mark start of file again
            } else {
                in.reset();
            }

            if (supported) {
                ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_EPS);
                boolean success = determineSize(in, context, info);
View Full Code Here

            }

            if (supported) {
                ImageInfo info = new ImageInfo(uri, MimeConstants.MIME_EPS);
                boolean success = determineSize(in, context, info);
                in.reset(); //Need to go back to start of file
                if (!success) {
                    //No BoundingBox found, so probably no EPS
                    return null;
                }
                if (in.getStreamPosition() != 0) {
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.