MCPcopy Index your code
hub / github.com/apache/commons-io / copy

Method copy

src/main/java/org/apache/commons/io/IOUtils.java:2077–2083  ·  view source on GitHub ↗

Copies bytes from an InputStream to an OutputStream . This method buffers the input internally, so there is no need to use a BufferedInputStream . Large streams (over 2GB) will return a bytes copied value of -1 after the copy has completed si

(final InputStream input, final OutputStream output)

Source from the content-addressed store, hash-verified

2075 * @since 1.1
2076 */
2077 public static int copy(final InputStream input, final OutputStream output) throws IOException {
2078 final long count = copyLarge(input, output);
2079 if (count > Integer.MAX_VALUE) {
2080 return -1;
2081 }
2082 return (int) count;
2083 }
2084
2085 /**
2086 * Copies bytes from an <code>InputStream</code> to an <code>OutputStream</code> using an internal buffer of the

Calls 3

copyLargeMethod · 0.95
toCharsetMethod · 0.95
flushMethod · 0.45