public class SnappyFramedInputStream extends InputStream
InputStream
.Modifier and Type | Class and Description |
---|---|
static class |
AbstractSnappyInputStream.FrameData |
static class |
AbstractSnappyInputStream.FrameMetaData |
Constructor and Description |
---|
SnappyFramedInputStream(InputStream in,
boolean verifyChecksums) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
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.
|
int |
read() |
int |
read(byte[] output,
int offset,
int length) |
mark, markSupported, read, reset, skip
public SnappyFramedInputStream(InputStream in, boolean verifyChecksums) throws IOException
IOException
protected AbstractSnappyInputStream.FrameMetaData getFrameMetaData(byte[] frameHeader) throws IOException
IOException
protected AbstractSnappyInputStream.FrameData getFrameData(byte[] frameHeader, byte[] content, int length)
frameHeader
- The frame header.content
- The content of the of the frame. Content begins at index 0
.length
- The length of the content.public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] output, int offset, int length) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
Copyright © 2011–2020. All rights reserved.