From 1f0d7bd6cd3eeaef145ea989bed8073f497d8624 Mon Sep 17 00:00:00 2001 From: "Taro L. Saito" Date: Thu, 28 Mar 2013 13:02:27 +0900 Subject: [PATCH] #26. Add throws IOException to compress methods --- src/main/java/org/xerial/snappy/Snappy.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/xerial/snappy/Snappy.java b/src/main/java/org/xerial/snappy/Snappy.java index 96f1670..dbc29c8 100755 --- a/src/main/java/org/xerial/snappy/Snappy.java +++ b/src/main/java/org/xerial/snappy/Snappy.java @@ -151,7 +151,7 @@ public class Snappy * @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 class Snappy * @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 class Snappy * @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 class Snappy * @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 class Snappy * @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 class Snappy * @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 }