APIdia Launch Partner
Top Fields Constructors Methods
com.sun.imageio.plugins.png

pack-priv final Class ChunkStream

Located in compilation unit of com.sun.imageio.plugins.png.PNGImageWriter.

extends ImageOutputStreamImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final CRC
private final long
private final ImageOutputStream

Constructor Summary

AccessConstructor and Description
pack-priv
ChunkStream(int type, ImageOutputStream stream)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public int
read()

Implements abstract javax.imageio.stream.ImageInputStreamImpl.read.

Implements javax.imageio.stream.ImageInputStream.read.

Reads a single byte from the stream and returns it as an integer between 0 and 255.

public int
read(byte[] b, int off, int len)

Implements abstract javax.imageio.stream.ImageInputStreamImpl.read.

Implements javax.imageio.stream.ImageInputStream.read.

Reads up to len bytes from the stream, and stores them into b starting at index off.

public void
write(byte[] b, int off, int len)

Implements abstract javax.imageio.stream.ImageOutputStreamImpl.write.

Implements javax.imageio.stream.ImageOutputStream.write.

Writes a sequence of bytes to the stream at the current position.

public void
write(int b)

Implements abstract javax.imageio.stream.ImageOutputStreamImpl.write.

Implements javax.imageio.stream.ImageOutputStream.write.

Writes a single byte to the stream at the current position.

Inherited from javax.imageio.stream.ImageOutputStreamImpl:
flushBitswritewriteBitwriteBitswriteBooleanwriteBytewriteByteswriteCharwriteCharswriteCharswriteDoublewriteDoubleswriteFloatwriteFloatswriteIntwriteIntswriteLongwriteLongswriteShortwriteShortswriteUTF

Field Detail

crcback to summary
private final CRC crc
startPosback to summary
private final long startPos
streamback to summary
private final ImageOutputStream stream

Constructor Detail

ChunkStreamback to summary
pack-priv ChunkStream(int type, ImageOutputStream stream) throws IOException

Method Detail

finishback to summary
pack-priv void finish() throws IOException
readback to summary
public int read() throws IOException

Implements abstract javax.imageio.stream.ImageInputStreamImpl.read.

Implements javax.imageio.stream.ImageInputStream.read.

Doc from javax.imageio.stream.ImageInputStream.read.

Reads a single byte from the stream and returns it as an integer between 0 and 255. If the end of the stream is reached, -1 is returned.

The bit offset within the stream is reset to zero before the read occurs.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
readback to summary
public int read(byte[] b, int off, int len) throws IOException

Implements abstract javax.imageio.stream.ImageInputStreamImpl.read.

Implements javax.imageio.stream.ImageInputStream.read.

Doc from javax.imageio.stream.ImageInputStream.read.

Reads up to len bytes from the stream, and stores them into b starting at index off. The number of bytes read is returned. If no bytes can be read because the end of the stream has been reached, -1 is returned.

The bit offset within the stream is reset to zero before the read occurs.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(byte[] b, int off, int len) throws IOException

Implements abstract javax.imageio.stream.ImageOutputStreamImpl.write.

Implements javax.imageio.stream.ImageOutputStream.write.

Doc from javax.imageio.stream.ImageOutputStream.write.

Writes a sequence of bytes to the stream at the current position. If len is 0, nothing is written. The byte b[off] is written first, then the byte b[off + 1], and so on.

If the bit offset within the stream is non-zero, the remainder of the current byte is padded with 0s and written out first. The bit offset will be 0 after the write. Implementers can use the flushBits method of ImageOutputStreamImpl to guarantee this.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
writeback to summary
public void write(int b) throws IOException

Implements abstract javax.imageio.stream.ImageOutputStreamImpl.write.

Implements javax.imageio.stream.ImageOutputStream.write.

Doc from javax.imageio.stream.ImageOutputStream.write.

Writes a single byte to the stream at the current position. The 24 high-order bits of b are ignored.

If the bit offset within the stream is non-zero, the remainder of the current byte is padded with 0s and written out first. The bit offset will be 0 after the write. Implementers can use the flushBits method of ImageOutputStreamImpl to guarantee this.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.