javax.imageio.stream.ImageInputStream#readInt ( )源码实例Demo

下面列出了javax.imageio.stream.ImageInputStream#readInt ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jdk1.8-source-analysis   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码2 项目: dragonwell8_jdk   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码3 项目: healthcare-dicom-dicomweb-adapter   文件: Box.java
/** 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();
}
 
源代码4 项目: TencentKona-8   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码5 项目: jdk8u60   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码6 项目: JDKSourceCode1.8   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码7 项目: openjdk-jdk8u   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码8 项目: openjdk-jdk8u-backup   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码9 项目: Bytecoder   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码10 项目: openjdk-jdk9   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码11 项目: jdk8u-jdk   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码12 项目: hottub   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码13 项目: openjdk-8-source   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码14 项目: openjdk-8   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码15 项目: jdk8u_jdk   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码16 项目: jdk8u-jdk   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}
 
源代码17 项目: jdk8u-dev-jdk   文件: PNGImageReader.java
public PNGImageDataEnumeration(ImageInputStream stream)
    throws IOException {
    this.stream = stream;
    this.length = stream.readInt();
    int type = stream.readInt(); // skip chunk type
}