public class Streams extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Streams()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
copy(File input,
File output,
byte[] buffer,
long length)
Copies all or some bytes from
input to output. |
static long |
copy(File input,
OutputStream output,
byte[] buffer,
long length) |
static long |
copy(InputStream input,
File output,
byte[] buffer,
long length) |
static long |
copy(InputStream input,
OutputStream output,
byte[] buffer)
Copies all bytes from
input to output using given
buffer. |
static long |
copy(InputStream input,
OutputStream output,
byte[] buffer,
long length)
Copies bytes from
input to output using specified
buffer. |
public static long copy(InputStream input, OutputStream output, byte[] buffer, long length) throws IOException
input to output using specified
buffer.input - inputoutput - outputbuffer - the bufferlength - number of bytes to copy; -1L for unlimited.IOException - if an I/O error occurspublic static long copy(InputStream input, OutputStream output, byte[] buffer) throws IOException
input to output using given
buffer.input - the inputoutput - the outputbuffer - the bufferIOException - if an I/O error occurs.public static long copy(File input, OutputStream output, byte[] buffer, long length) throws IOException
IOExceptionpublic static long copy(InputStream input, File output, byte[] buffer, long length) throws IOException
IOExceptionpublic static long copy(File input, File output, byte[] buffer, long length) throws IOException
input to output.input - input fileoutput - output filebuffer - byte bufferlength - number of bytes to copy; any negative for unlimitedIOException - if an I/O error occurs.aCopyright © 2011-2013. All Rights Reserved.