org.xerial.snappy
Class SnappyNative
java.lang.Object
org.xerial.snappy.SnappyNative
- All Implemented Interfaces:
- SnappyNativeAPI
public class SnappyNative
- extends Object
- implements SnappyNativeAPI
JNI interface of the SnappyNativeAPI implementation. The native
method in this class is defined in SnappyNative.h (genereted by javah) and
SnappyNative.cpp
- Author:
- leo
|
Method Summary |
void |
arrayCopy(Object src,
int offset,
int byteLength,
Object dest,
int dOffset)
|
boolean |
isValidCompressedBuffer(ByteBuffer compressed,
int offset,
int len)
|
boolean |
isValidCompressedBuffer(Object input,
int offset,
int len)
|
int |
maxCompressedLength(int source_bytes)
|
String |
nativeLibraryVersion()
|
int |
rawCompress(ByteBuffer input,
int inputOffset,
int inputLength,
ByteBuffer compressed,
int outputOffset)
|
int |
rawCompress(Object input,
int inputOffset,
int inputByteLength,
Object output,
int outputOffset)
|
int |
rawUncompress(ByteBuffer compressed,
int inputOffset,
int inputLength,
ByteBuffer uncompressed,
int outputOffset)
|
int |
rawUncompress(Object input,
int inputOffset,
int inputLength,
Object output,
int outputOffset)
|
void |
throw_error(int errorCode)
|
int |
uncompressedLength(ByteBuffer compressed,
int offset,
int len)
|
int |
uncompressedLength(Object input,
int offset,
int len)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SnappyNative
public SnappyNative()
nativeLibraryVersion
public String nativeLibraryVersion()
- Specified by:
nativeLibraryVersion in interface SnappyNativeAPI
rawCompress
public int rawCompress(ByteBuffer input,
int inputOffset,
int inputLength,
ByteBuffer compressed,
int outputOffset)
throws IOException
- Specified by:
rawCompress in interface SnappyNativeAPI
- Throws:
IOException
rawCompress
public int rawCompress(Object input,
int inputOffset,
int inputByteLength,
Object output,
int outputOffset)
- Specified by:
rawCompress in interface SnappyNativeAPI
rawUncompress
public int rawUncompress(ByteBuffer compressed,
int inputOffset,
int inputLength,
ByteBuffer uncompressed,
int outputOffset)
throws IOException
- Specified by:
rawUncompress in interface SnappyNativeAPI
- Throws:
IOException
rawUncompress
public int rawUncompress(Object input,
int inputOffset,
int inputLength,
Object output,
int outputOffset)
throws IOException
- Specified by:
rawUncompress in interface SnappyNativeAPI
- Throws:
IOException
maxCompressedLength
public int maxCompressedLength(int source_bytes)
- Specified by:
maxCompressedLength in interface SnappyNativeAPI
uncompressedLength
public int uncompressedLength(ByteBuffer compressed,
int offset,
int len)
throws IOException
- Specified by:
uncompressedLength in interface SnappyNativeAPI
- Throws:
IOException
uncompressedLength
public int uncompressedLength(Object input,
int offset,
int len)
throws IOException
- Specified by:
uncompressedLength in interface SnappyNativeAPI
- Throws:
IOException
isValidCompressedBuffer
public boolean isValidCompressedBuffer(ByteBuffer compressed,
int offset,
int len)
throws IOException
- Specified by:
isValidCompressedBuffer in interface SnappyNativeAPI
- Throws:
IOException
isValidCompressedBuffer
public boolean isValidCompressedBuffer(Object input,
int offset,
int len)
throws IOException
- Specified by:
isValidCompressedBuffer in interface SnappyNativeAPI
- Throws:
IOException
arrayCopy
public void arrayCopy(Object src,
int offset,
int byteLength,
Object dest,
int dOffset)
throws IOException
- Specified by:
arrayCopy in interface SnappyNativeAPI
- Throws:
IOException
throw_error
public void throw_error(int errorCode)
throws IOException
- Specified by:
throw_error in interface SnappyNativeAPI
- Throws:
IOException
Copyright © 2011. All Rights Reserved.