org.xerial.snappy
Class SnappyCodec
java.lang.Object
org.xerial.snappy.SnappyCodec
public class SnappyCodec
- extends Object
Preamble header for SnappyOutputStream
.
The magic header is the following 8 bytes data:
-126, 'S', 'N', 'A', 'P', 'P', 'Y', 0
- Author:
- leo
MAGIC_HEADER
public static final byte[] MAGIC_HEADER
MAGIC_LEN
public static final int MAGIC_LEN
- See Also:
- Constant Field Values
DEFAULT_VERSION
public static final int DEFAULT_VERSION
- See Also:
- Constant Field Values
MINIMUM_COMPATIBLE_VERSION
public static final int MINIMUM_COMPATIBLE_VERSION
- See Also:
- Constant Field Values
magic
public final byte[] magic
version
public final int version
compatibleVersion
public final int compatibleVersion
toString
public String toString()
- Overrides:
toString
in class Object
headerSize
public static int headerSize()
writeHeader
public void writeHeader(OutputStream out)
throws IOException
- Throws:
IOException
isValidMagicHeader
public boolean isValidMagicHeader()
readHeader
public static SnappyCodec readHeader(InputStream in)
throws IOException
- Throws:
IOException
currentHeader
public static SnappyCodec currentHeader()
Copyright © 2011 xerial.org. All Rights Reserved.