Once all IDAT chunks have been read, the read() methods will
return -1 and isFoundAllIDATChunks()
true. Once isFoundAllIDATChunks() returns
true, the length and type of the first chunk after the last
IDAT chunk may be found by calling getNextChunkLength() and
getNextChunkType(), respectively. The source stream will at
this point be positioned at the first byte of the data field after the last
IDAT chunk (which could be the first byte of the CRC code if the length is
zero).
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| pack-priv static final int | |
| private int | |
| private int | |
| private int | |
| private DataInputStream |
| Access | Constructor and Description |
|---|---|
| pack-priv | PNGIDATChunkInputStream(DataInputStream
stream positioned at the beginning of the data field of the
first IDAT chunk in the PNG stream. input, int the length of the data field of the first
IDAT chunk. firstIDATChunkLength)Create the stream. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv int | |
| pack-priv int | |
| pack-priv boolean | |
| private void | |
| public int | read()
Implements abstract java. Reads the next byte of data from the input stream. |
| public int | read(byte[]
the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads up to |
| foundAllIDATChunks | back to summary |
|---|---|
| private boolean foundAllIDATChunks | |
| IDAT_TYPE | back to summary |
|---|---|
| pack-priv static final int IDAT_TYPE | |
| nextChunkLength | back to summary |
|---|---|
| private int nextChunkLength | |
| nextChunkType | back to summary |
|---|---|
| private int nextChunkType | |
| numBytesAvailable | back to summary |
|---|---|
| private int numBytesAvailable | |
| source | back to summary |
|---|---|
| private DataInputStream source | |
| PNGIDATChunkInputStream | back to summary |
|---|---|
| pack-priv PNGIDATChunkInputStream(DataInputStream input, int firstIDATChunkLength) throws IOException Create the stream.
| |
| getNextChunkLength | back to summary |
|---|---|
| pack-priv int getNextChunkLength() | |
| getNextChunkType | back to summary |
|---|---|
| pack-priv int getNextChunkType() | |
| isFoundAllIDATChunks | back to summary |
|---|---|
| pack-priv boolean isFoundAllIDATChunks() | |
| nextChunk | back to summary |
|---|---|
| private void nextChunk() throws IOException | |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements abstract java. Doc from java. Reads the next byte of data from the input stream. The value byte is
returned as an
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Reads up to This method blocks until input data is available, end of file is detected, or an exception is thrown. If The first byte read is stored into element In every case, elements
| |