Permalink
Browse files

Fixes #26. Add throws IOException to rawCompress

  • Loading branch information...
1 parent e1b593d commit 64c35c7081376e70ab868babacaed57ba43ecd11 @xerial committed Mar 28, 2013
@@ -354,7 +354,7 @@ public static long rawUncompress(long inputAddr, long inputSize, long destAddr)
* the input byte size
* @return compressed data
*/
- public static byte[] rawCompress(Object data, int byteSize) {
+ public static byte[] rawCompress(Object data, int byteSize) throws IOException {
byte[] buf = new byte[Snappy.maxCompressedLength(byteSize)];
int compressedByteSize = ((SnappyNativeAPI) impl).rawCompress(data, 0, byteSize, buf, 0);
byte[] result = new byte[compressedByteSize];

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -54,7 +54,7 @@
public native int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed,
int outputOffset) throws IOException;
- public native int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset);
+ public native int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException;
public native int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed,
int outputOffset) throws IOException;
@@ -51,7 +51,7 @@
public int rawCompress(ByteBuffer input, int inputOffset, int inputLength, ByteBuffer compressed, int outputOffset)
throws IOException;
- public int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset);
+ public int rawCompress(Object input, int inputOffset, int inputByteLength, Object output, int outputOffset) throws IOException;
public int rawUncompress(ByteBuffer compressed, int inputOffset, int inputLength, ByteBuffer uncompressed,
int outputOffset) throws IOException;

0 comments on commit 64c35c7

Please sign in to comment.