MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / transfer

Method transfer

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

Transfers the length of the buffer amount of data from the input stream to the output stream @param in the input @param out the output @param buffer the buffer and size to use @return the actual transfered amount @throws IOException shit happens

(InputStream in, OutputStream out, byte[] buffer)

Source from the content-addressed store, hash-verified

144 * @throws IOException shit happens
145 */
146 public static int transfer(InputStream in, OutputStream out, byte[] buffer) throws IOException {
147 int r = in.read(buffer);
148
149 if (r != -1) {
150 out.write(buffer, 0, r);
151 }
152
153 return r;
154 }
155
156 /**
157 * Transfers the length of the buffer amount of data from the input stream to

Callers

nothing calls this directly

Calls 2

readMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected