| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | buffer
Buffer contains a copy of the uncompressed data for the block. |
| private final BufferPool | |
| private boolean | closed
Indicates if this instance has been closed. |
| private final Checksum | |
| private boolean | |
| private final ByteBuffer | |
| private ByteBuffer | input
A single frame read from the underlying |
| private int | |
| private final ReadableByteChannel | |
| private ByteBuffer | uncompressedDirect
The decompressed data from |
| private int | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | SnappyFramedInputStream(InputStream
the underlying input stream. Must not be in)null.Creates a Snappy input stream to read data from the specified underlying input stream. |
| public | SnappyFramedInputStream(InputStream
the underlying input stream. Must not be in, BufferPool null.Used to obtain buffer instances. Must not be bufferPool)null.Creates a Snappy input stream to read data from the specified underlying input stream. |
| public | SnappyFramedInputStream(InputStream
the underlying input stream. Must not be in, boolean null.if true, checksums in input stream will be verified verifyChecksums)Creates a Snappy input stream to read data from the specified underlying input stream. |
| public | SnappyFramedInputStream(InputStream
the underlying input stream. Must not be in, boolean null.if true, checksums in input stream will be verified verifyChecksums, BufferPool Used to obtain buffer instances. Must not be bufferPool)null.Creates a Snappy input stream to read data from the specified underlying input stream. |
| public | SnappyFramedInputStream(ReadableByteChannel
the underlying readable channel. Must not be in, BufferPool null.Used to obtain buffer instances. Must not be bufferPool)null.Creates a Snappy input stream to read data from the specified underlying channel. |
| public | SnappyFramedInputStream(ReadableByteChannel
the underlying readable channel. Must not be in)null.Creates a Snappy input stream to read data from the specified underlying channel. |
| public | SnappyFramedInputStream(ReadableByteChannel
the underlying readable channel. Must not be in, boolean null.if true, checksums in input stream will be verified verifyChecksums)Creates a Snappy input stream to read data from the specified underlying channel. |
| public | SnappyFramedInputStream(ReadableByteChannel
the underlying readable channel. Must not be in, boolean null.if true, checksums in input stream will be verified verifyChecksums, BufferPool Used to obtain buffer instances. Must not be bufferPool)null.Creates a Snappy input stream to read data from the specified underlying channel. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | available()
Overrides java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. |
| public void | close()
Overrides java. Implements java. Closes this channel. |
| private boolean | |
| private int | |
| private SnappyFramedInputStream. | |
| private SnappyFramedInputStream. | |
| public boolean | |
| 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. output, int the start offset in array offset, int b
at which the data is written.the maximum number of bytes to read. length)Overrides java. Reads up to |
| public int | read(ByteBuffer
The buffer into which bytes are to be transferred dst)Implements java. Reads a sequence of bytes from this channel into the given buffer. |
| private boolean | |
| public long | Returns: The number of bytes transferred.The destination to write decompressed content to. os)Overrides java. Transfers the entire content of this |
| public long | Returns: The number of bytes transferred.The destination to write decompressed content to. wbc)Transfers the entire content of this |
| buffer | back to summary |
|---|---|
| private byte[] buffer Buffer contains a copy of the uncompressed data for the block. | |
| bufferPool | back to summary |
|---|---|
| private final BufferPool bufferPool | |
| closed | back to summary |
|---|---|
| private boolean closed Indicates if this instance has been closed. | |
| crc32 | back to summary |
|---|---|
| private final Checksum crc32 | |
| eof | back to summary |
|---|---|
| private boolean eof Indicates if we have reached the EOF on | |
| frameHeader | back to summary |
|---|---|
| private final ByteBuffer frameHeader | |
| input | back to summary |
|---|---|
| private ByteBuffer input A single frame read from the underlying | |
| position | back to summary |
|---|---|
| private int position The next position to read from | |
| rbc | back to summary |
|---|---|
| private final ReadableByteChannel rbc | |
| uncompressedDirect | back to summary |
|---|---|
| private ByteBuffer uncompressedDirect The decompressed data from | |
| valid | back to summary |
|---|---|
| private int valid The position in | |
| verifyChecksums | back to summary |
|---|---|
| private final boolean verifyChecksums | |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(InputStream in) throws IOException Creates a Snappy input stream to read data from the specified underlying input stream.
Uses
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(InputStream in, BufferPool bufferPool) throws IOException Creates a Snappy input stream to read data from the specified underlying input stream.
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(InputStream in, boolean verifyChecksums) throws IOException Creates a Snappy input stream to read data from the specified underlying input stream.
Uses
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(InputStream in, boolean verifyChecksums, BufferPool bufferPool) throws IOException Creates a Snappy input stream to read data from the specified underlying input stream.
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(ReadableByteChannel in, BufferPool bufferPool) throws IOException Creates a Snappy input stream to read data from the specified underlying channel.
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(ReadableByteChannel in) throws IOException Creates a Snappy input stream to read data from the specified underlying channel.
Uses
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(ReadableByteChannel in, boolean verifyChecksums) throws IOException Creates a Snappy input stream to read data from the specified underlying channel.
Uses
| |
| SnappyFramedInputStream | back to summary |
|---|---|
| public SnappyFramedInputStream(ReadableByteChannel in, boolean verifyChecksums, BufferPool bufferPool) throws IOException Creates a Snappy input stream to read data from the specified underlying channel.
| |
| allocateBuffersBasedOnSize | back to summary |
|---|---|
| private void allocateBuffersBasedOnSize(int size) | |
| available | back to summary |
|---|---|
| public int available() throws IOException Overrides java. Doc from java. Returns an estimate of the number of bytes that can be read (or skipped over) from this input stream without blocking, which may be 0, or 0 when end of stream is detected. The read might be on the same thread or another thread. A single read or skip of this many bytes will not block, but may read or skip fewer bytes. Note that while some implementations of A subclass's implementation of this method may choose to throw an
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Overrides java. Implements java. Doc from java. Closes this channel. After a channel is closed, any further attempt to invoke I/O
operations upon it will cause a If this channel is already closed then invoking this method has no effect. This method may be invoked at any time. If some other thread has already invoked it, however, then another invocation will block until the first invocation is complete, after which it will return without effect.
| |
| ensureBuffer | back to summary |
|---|---|
| private boolean ensureBuffer() throws IOException | |
| getCrc32c | back to summary |
|---|---|
| private int getCrc32c(ByteBuffer content) | |
| getFrameData | back to summary |
|---|---|
| private SnappyFramedInputStream. | |
| getFrameMetaData | back to summary |
|---|---|
| private SnappyFramedInputStream. | |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements java. Doc from java. Tells whether or not this channel is open.
| |
| 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[] output, int offset, int length) 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
| |
| read | back to summary |
|---|---|
| public int read(ByteBuffer dst) throws IOException Implements java. Doc from java. Reads a sequence of bytes from this channel into the given buffer. An attempt is made to read up to r bytes from the channel,
where r is the number of bytes remaining in the buffer, that is,
Suppose that a byte sequence of length n is read, where
A read operation might not fill the buffer, and in fact it might not read any bytes at all. Whether or not it does so depends upon the nature and state of the channel. A socket channel in non-blocking mode, for example, cannot read any more bytes than are immediately available from the socket's input buffer; similarly, a file channel cannot read any more bytes than remain in the file. It is guaranteed, however, that if a channel is in blocking mode and there is at least one byte remaining in the buffer then this method will block until at least one byte is read. This method may be invoked at any time. If another thread has already initiated a read operation upon this channel, however, then an invocation of this method will block until the first operation is complete.
| |
| readBlockHeader | back to summary |
|---|---|
| private boolean readBlockHeader() throws IOException | |
| transferTo | back to summary |
|---|---|
| public long transferTo(OutputStream os) throws IOException Overrides java. Transfers the entire content of this
Unlike
| |
| transferTo | back to summary |
|---|---|
| public long transferTo(WritableByteChannel wbc) throws IOException Transfers the entire content of this
Unlike
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final SnappyFramedInputStream. | |
| public static final SnappyFramedInputStream. | |
| public static final SnappyFramedInputStream. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SnappyFramedInputStream. | |
| public static SnappyFramedInputStream. |
| RAW | back to summary |
|---|---|
| public static final SnappyFramedInputStream. | |
| SKIP | back to summary |
|---|---|
| public static final SnappyFramedInputStream. | |
| UNCOMPRESS | back to summary |
|---|---|
| public static final SnappyFramedInputStream. | |
| FrameAction | back to summary |
|---|---|
| private FrameAction() | |
| valueOf | back to summary |
|---|---|
| public static SnappyFramedInputStream. | |
| values | back to summary |
|---|---|
| public static SnappyFramedInputStream. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| checkSum | back to summary |
|---|---|
| pack-priv final int checkSum | |
| offset | back to summary |
|---|---|
| pack-priv final int offset | |
| FrameData | back to summary |
|---|---|
| public FrameData(int checkSum, int offset) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final SnappyFramedInputStream. | |
| pack-priv final int |
| Access | Constructor and Description |
|---|---|
| public |
| frameAction | back to summary |
|---|---|
| pack-priv final SnappyFramedInputStream. | |
| length | back to summary |
|---|---|
| pack-priv final int length | |
| FrameMetaData | back to summary |
|---|---|
| public FrameMetaData(SnappyFramedInputStream. | |