MCPcopy Create free account
hub / github.com/diyhi/bbs / inputStreamToByteArray

Method inputStreamToByteArray

src/main/java/cms/utils/FileUtil.java:54–59  ·  view source on GitHub ↗

InputStream转byte @param input 输入流 @return @throws IOException

(InputStream input)

Source from the content-addressed store, hash-verified

52 * @throws IOException
53 */
54 public static byte[] inputStreamToByteArray(InputStream input)
55 throws IOException{
56 ByteArrayOutputStream output = new ByteArrayOutputStream();
57 copy(input, output);
58 return output.toByteArray();
59 }
60 private static int copy(InputStream input, OutputStream output)throws IOException{
61 byte[] buffer = new byte[4096];
62 long count = 0L;

Callers

nothing calls this directly

Calls 1

copyMethod · 0.95

Tested by

no test coverage detected