Copy 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 sinc
(InputStream input, OutputStream output)
| 1244 | * @since Commons IO 1.1 |
| 1245 | */ |
| 1246 | public static int copy(InputStream input, OutputStream output) throws IOException { |
| 1247 | long count = copyLarge(input, output); |
| 1248 | if (count > Integer.MAX_VALUE) { |
| 1249 | return -1; |
| 1250 | } |
| 1251 | return (int) count; |
| 1252 | } |
| 1253 | |
| 1254 | /** |
| 1255 | * Copy bytes from a large (over 2GB) <code>InputStream</code> to an |
no test coverage detected