Package org.iq80.snappy
Class SnappyFramedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.iq80.snappy.AbstractSnappyInputStream
-
- org.iq80.snappy.SnappyFramedInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class SnappyFramedInputStream extends AbstractSnappyInputStream
Implements the x-snappy-framed as anInputStream
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.iq80.snappy.AbstractSnappyInputStream
AbstractSnappyInputStream.FrameAction, AbstractSnappyInputStream.FrameData, AbstractSnappyInputStream.FrameMetaData
-
-
Constructor Summary
Constructors Constructor Description SnappyFramedInputStream(java.io.InputStream in, boolean verifyChecksums)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractSnappyInputStream.FrameData
getFrameData(byte[] frameHeader, byte[] content, int length)
Take the frame header and the content of the frame to describe metadata about the content.protected AbstractSnappyInputStream.FrameMetaData
getFrameMetaData(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, read
-
-
-
-
Method Detail
-
getFrameMetaData
protected AbstractSnappyInputStream.FrameMetaData getFrameMetaData(byte[] frameHeader) throws java.io.IOException
Description copied from class:AbstractSnappyInputStream
Use the content of the frameHeader to describe what type of frame we have and the action to take.- Specified by:
getFrameMetaData
in classAbstractSnappyInputStream
- Throws:
java.io.IOException
-
getFrameData
protected AbstractSnappyInputStream.FrameData getFrameData(byte[] frameHeader, byte[] content, int length)
Description copied from class:AbstractSnappyInputStream
Take the frame header and the content of the frame to describe metadata about the content.- Specified by:
getFrameData
in 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.
-
-