Package org.iq80.snappy
Class SnappyFramedInputStream
java.lang.Object
java.io.InputStream
org.iq80.snappy.AbstractSnappyInputStream
org.iq80.snappy.SnappyFramedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Implements the x-snappy-framed as an
InputStream.-
Nested Class Summary
Nested classes/interfaces inherited from class org.iq80.snappy.AbstractSnappyInputStream
AbstractSnappyInputStream.FrameAction, AbstractSnappyInputStream.FrameData, AbstractSnappyInputStream.FrameMetaData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractSnappyInputStream.FrameDatagetFrameData(byte[] frameHeader, byte[] content, int length) Take the frame header and the content of the frame to describe metadata about the content.protected AbstractSnappyInputStream.FrameMetaDatagetFrameMetaData(byte[] frameHeader) Use the content of the frameHeader to describe what type of frame we have and the action to take.Methods inherited from class org.iq80.snappy.AbstractSnappyInputStream
available, close, read, readMethods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
SnappyFramedInputStream
- Throws:
IOException
-
-
Method Details
-
getFrameMetaData
protected AbstractSnappyInputStream.FrameMetaData getFrameMetaData(byte[] frameHeader) throws IOException Description copied from class:AbstractSnappyInputStreamUse the content of the frameHeader to describe what type of frame we have and the action to take.- Specified by:
getFrameMetaDatain classAbstractSnappyInputStream- Throws:
IOException
-
getFrameData
protected AbstractSnappyInputStream.FrameData getFrameData(byte[] frameHeader, byte[] content, int length) Description copied from class:AbstractSnappyInputStreamTake the frame header and the content of the frame to describe metadata about the content.- Specified by:
getFrameDatain classAbstractSnappyInputStream- Parameters:
frameHeader- The frame header.content- The content of the of the frame. Content begins at index0.length- The length of the content.- Returns:
- Metadata about the content of the frame.
-