Package javax.imageio.stream

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


        }

        ImageInputStream stream = (ImageInputStream)source;
        byte[] b = new byte[2];
        stream.mark();
        stream.readFully(b);
        stream.reset();

        return (b[0] == 0x42) && (b[1] == 0x4d);
    }
View Full Code Here


        }
       
        ImageInputStream stream = (ImageInputStream)input;
        byte[] b = new byte[4];
        stream.mark();
        stream.readFully(b);
        stream.reset();

        return ((b[0] == (byte)0x49 && b[1] == (byte)0x49 &&
                 b[2] == (byte)0x2a && b[3] == (byte)0x00) ||
                (b[0] == (byte)0x4d && b[1] == (byte)0x4d &&
View Full Code Here

            byte[] buffer;
            try {
        if( iis.length() >0){
            //If length known then it it is simple
            buffer = new byte[(int)iis.length()];
            iis.readFully(buffer);
        }else{
            // if the length not known then we need to read it in a loop
            ByteArrayOutputStream baos = new ByteArrayOutputStream(8192);
            buffer = new byte[8192];
            int count;
View Full Code Here

    ImageInputStream stream = (ImageInputStream) input;
   
    byte[] b = new byte[4];
   
    stream.mark();
    stream.readFully(b, 0, 4);
    stream.reset();
   
    return (b[0] == 'D') && (b[1] == 'D') && (b[2] == 'S') && (b[3] == ' ');
  }
 
View Full Code Here

        ImageInputStream stream = (ImageInputStream)source;
        byte[] b = new byte[2];

        stream.mark();
        stream.readFully(b);
        stream.reset();

        return (b[0] == 0x50) && (b[1] >= 0x31) && (b[1] <= 0x36);
    }
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.