Class SnappyNative
java.lang.Object
org.xerial.snappy.SnappyNative
- All Implemented Interfaces:
SnappyApi
JNI interface of the
Snappy implementation. The native method in this class is
defined in SnappyNative.h (genereted by javah) and SnappyNative.cpp
DO NOT USE THIS CLASS since the direct use of this class might break the
native library code loading in SnappyLoader.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanisValidCompressedBuffer(long inputAddr, long offset, long len) booleanisValidCompressedBuffer(Object input, int offset, int len) booleanisValidCompressedBuffer(ByteBuffer compressed, int offset, int len) intmaxCompressedLength(int source_bytes) longrawCompress(long inputAddr, long inputSize, long destAddr) intrawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) intrawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset) longrawUncompress(long inputAddr, long inputSize, long destAddr) intrawUncompress(Object input, int inputOffset, int inputLength, Object output, int outputOffset) intrawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed, int outputOffset) voidthrow_error(int errorCode) longuncompressedLength(long inputAddr, long len) intuncompressedLength(Object input, int offset, int len) intuncompressedLength(ByteBuffer compressed, int offset, int len)
-
Constructor Details
-
SnappyNative
public SnappyNative()
-
-
Method Details
-
nativeLibraryVersion
-
rawCompress
- Specified by:
rawCompressin interfaceSnappyApi- Throws:
IOException
-
rawUncompress
- Specified by:
rawUncompressin interfaceSnappyApi- Throws:
IOException
-
rawCompress
public int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset) throws IOException - Specified by:
rawCompressin interfaceSnappyApi- Throws:
IOException
-
rawCompress
public int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException - Specified by:
rawCompressin interfaceSnappyApi- Throws:
IOException
-
rawUncompress
public int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed, int outputOffset) throws IOException - Specified by:
rawUncompressin interfaceSnappyApi- Throws:
IOException
-
rawUncompress
public int rawUncompress(Object input, int inputOffset, int inputLength, Object output, int outputOffset) throws IOException - Specified by:
rawUncompressin interfaceSnappyApi- Throws:
IOException
-
maxCompressedLength
public int maxCompressedLength(int source_bytes) - Specified by:
maxCompressedLengthin interfaceSnappyApi
-
uncompressedLength
- Specified by:
uncompressedLengthin interfaceSnappyApi- Throws:
IOException
-
uncompressedLength
- Specified by:
uncompressedLengthin interfaceSnappyApi- Throws:
IOException
-
uncompressedLength
- Specified by:
uncompressedLengthin interfaceSnappyApi- Throws:
IOException
-
isValidCompressedBuffer
public boolean isValidCompressedBuffer(ByteBuffer compressed, int offset, int len) throws IOException - Specified by:
isValidCompressedBufferin interfaceSnappyApi- Throws:
IOException
-
isValidCompressedBuffer
- Specified by:
isValidCompressedBufferin interfaceSnappyApi- Throws:
IOException
-
isValidCompressedBuffer
- Specified by:
isValidCompressedBufferin interfaceSnappyApi- Throws:
IOException
-
arrayCopy
public void arrayCopy(Object src, int offset, int byteLength, Object dest, int dOffset) throws IOException - Specified by:
arrayCopyin interfaceSnappyApi- Throws:
IOException
-
throw_error
- Throws:
IOException
-