-
public class StreamUtilsdon't use android classes here, since this class is used outside of android
-
-
Field Summary
Fields Modifier and Type Field Description public final static intIO_BUFFER_SIZE
-
Method Summary
Modifier and Type Method Description static longcopy(InputStream in, OutputStream out)Copy the content of the input stream into the output stream, using a temporary byte arraybuffer whose size is defined by IO_BUFFER_SIZE. static voidcloseStream(Closeable stream)Closes the specified stream. -
-
Method Detail
-
copy
static long copy(InputStream in, OutputStream out)
Copy the content of the input stream into the output stream, using a temporary byte arraybuffer whose size is defined by IO_BUFFER_SIZE.
- Parameters:
in- The input stream to copy from.out- The output stream to copy to.
-
closeStream
static void closeStream(Closeable stream)
Closes the specified stream.
- Parameters:
stream- The stream to close.
-
-
-
-