refactor ConfigFilter

This commit is contained in:
wenshao
2012-09-01 11:58:38 +08:00
parent 7a77a70fbe
commit 864a883c2c
8 changed files with 289 additions and 185 deletions
@@ -63,14 +63,18 @@ public class IOUtils {
return null;
}
ByteArrayOutputStream output = new ByteArrayOutputStream();
copy(in, output);
return output.toByteArray();
return readByteArray(in);
} finally {
JdbcUtils.close(in);
}
}
public static byte[] readByteArray(InputStream input) throws IOException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
copy(input, output);
return output.toByteArray();
}
public static long copy(InputStream input, OutputStream output)
throws IOException {
final int EOF = -1;