MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / toByteArray

Method toByteArray

src/main/java/com/volmit/adapt/util/IO.java:552–556  ·  view source on GitHub ↗

Get the contents of an InputStream as a byte[] . This method buffers the input internally, so there is no need to use a BufferedInputStream . @param input the InputStream to read from @return the requested byte array @throws NullPointerException

(InputStream input)

Source from the content-addressed store, hash-verified

550 * @throws IOException if an I/O error occurs
551 */
552 public static byte[] toByteArray(InputStream input) throws IOException {
553 ByteArrayOutputStream output = new ByteArrayOutputStream();
554 copy(input, output);
555 return output.toByteArray();
556 }
557
558 /**
559 * Get the contents of a <code>Reader</code> as a <code>byte[]</code> using the

Callers 3

serializeStackMethod · 0.80
compressMethod · 0.80
sdecompressMethod · 0.80

Calls 1

copyMethod · 0.95

Tested by

no test coverage detected