mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor ConfigFilter
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user