Java Code Examples for javax.imageio.stream.ImageInputStream#readInt()
The following examples show how to use
javax.imageio.stream.ImageInputStream#readInt() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PNGImageReader.java From Bytecoder with Apache License 2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 2
Source File: PNGImageReader.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 3
Source File: PNGImageReader.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 4
Source File: PNGImageReader.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 5
Source File: PNGImageReader.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 6
Source File: PNGImageReader.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 7
Source File: PNGImageReader.java From hottub with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 8
Source File: PNGImageReader.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 9
Source File: PNGImageReader.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 10
Source File: PNGImageReader.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 11
Source File: PNGImageReader.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 12
Source File: PNGImageReader.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 13
Source File: PNGImageReader.java From JDKSourceCode1.8 with MIT License | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 14
Source File: PNGImageReader.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 15
Source File: PNGImageReader.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }
Example 16
Source File: Box.java From healthcare-dicom-dicomweb-adapter with Apache License 2.0 | 4 votes |
/** Reads a box from the <code>ImageInputStream</code. at the provided * position. */ public void read(ImageInputStream iis, int pos) throws IOException { iis.mark(); iis.seek(pos); length = iis.readInt(); type = iis.readInt(); int dataLength = 0; if(length == 0) { // Length unknown at time of stream creation. long streamLength = iis.length(); if(streamLength != -1) // Calculate box length from known stream length. dataLength = (int)(streamLength - iis.getStreamPosition()); else { // Calculate box length by reading to EOF. long dataPos = iis.getStreamPosition(); int bufLen = 1024; byte[] buf = new byte[bufLen]; long savePos = dataPos; try { iis.readFully(buf); dataLength += bufLen; savePos = iis.getStreamPosition(); } catch(EOFException eofe) { iis.seek(savePos); while(iis.read() != -1) dataLength++; } iis.seek(dataPos); } } else if(length == 1) { // Length given by XL parameter. extraLength = iis.readLong(); dataLength = (int)(extraLength - 16); } else if(length >= 8 && length < (1 << 32)) { // Length given by L parameter. dataLength = length - 8; } else { // Illegal value for L parameter. throw new IIOException("Illegal value "+length+ " for box length parameter."); } data = new byte[dataLength]; iis.readFully(data); iis.reset(); }
Example 17
Source File: PNGImageReader.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
public PNGImageDataEnumeration(ImageInputStream stream) throws IOException { this.stream = stream; this.length = stream.readInt(); int type = stream.readInt(); // skip chunk type }