Permalink
Browse files

#26. Add throws IOException to compress methods

  • Loading branch information...
1 parent 64c35c7 commit 1f0d7bd6cd3eeaef145ea989bed8073f497d8624 @xerial committed Mar 28, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/main/java/org/xerial/snappy/Snappy.java
@@ -151,7 +151,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(char[] input) {
+ public static byte[] compress(char[] input) throws IOException {
return rawCompress(input, input.length * 2); // char uses 2 bytes
}
@@ -161,7 +161,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(double[] input) {
+ public static byte[] compress(double[] input) throws IOException {
return rawCompress(input, input.length * 8); // double uses 8 bytes
}
@@ -171,7 +171,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(float[] input) {
+ public static byte[] compress(float[] input) throws IOException {
return rawCompress(input, input.length * 4); // float uses 4 bytes
}
@@ -181,7 +181,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(int[] input) {
+ public static byte[] compress(int[] input) throws IOException {
return rawCompress(input, input.length * 4); // int uses 4 bytes
}
@@ -191,7 +191,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(long[] input) {
+ public static byte[] compress(long[] input) throws IOException {
return rawCompress(input, input.length * 8); // long uses 8 bytes
}
@@ -201,7 +201,7 @@ public static int compress(ByteBuffer uncompressed, ByteBuffer compressed) throw
* @param input
* @return the compressed data
*/
- public static byte[] compress(short[] input) {
+ public static byte[] compress(short[] input) throws IOException {
return rawCompress(input, input.length * 2); // short uses 2 bytes
}

0 comments on commit 1f0d7bd

Please sign in to comment.