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

pack-priv final Class IDATOutputStream

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

extends ImageOutputStreamImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]
private int
private final int
private static final byte[]
private final CRC
private final Deflater
private long
private final ImageOutputStream
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
IDATOutputStream(ImageOutputStream stream, int chunkLength, int deflaterLevel)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
private 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.

private void
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

bufback to summary
private final byte[] buf
bytesRemainingback to summary
private int bytesRemaining
chunkLengthback to summary
private final int chunkLength
chunkTypeback to summary
private static final byte[] chunkType
crcback to summary
private final CRC crc
defback to summary
private final Deflater def
startPosback to summary
private long startPos
streamback to summary
private final ImageOutputStream stream
wbuf1back to summary
private final byte[] wbuf1

Constructor Detail

IDATOutputStreamback to summary
pack-priv IDATOutputStream(ImageOutputStream stream, int chunkLength, int deflaterLevel) throws IOException

Method Detail

deflateback to summary
pack-priv void deflate() throws IOException
finishback to summary
pack-priv void finish() throws IOException
finishChunkback to summary
private void finishChunk() 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.
startChunkback to summary
private void startChunk() throws IOException
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.