Here you can find the source of copy(InputStream in, BufferedOutputStream out)
Parameter | Description |
---|---|
in | the in |
out | the out |
Parameter | Description |
---|---|
IOException | Signals that an I/O exception has occurred. |
private static void copy(InputStream in, BufferedOutputStream out) throws IOException
//package com.java2s; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; public class Main { /**/*w w w. j a va 2 s . c om*/ * Copy. * * @param in the in * @param out the out * @throws IOException Signals that an I/O exception has occurred. */ private static void copy(InputStream in, BufferedOutputStream out) throws IOException { int byte_; while ((byte_ = in.read()) != -1) out.write(byte_); } }