public class ByteStreams extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ByteStreams()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static long |
copy(File input,
File output,
byte[] buffer,
long length)
Copies bytes from given input file to given output file.
|
static long |
copy(File input,
OutputStream output,
byte[] buffer,
long length)
Copies bytes from given input file to given output stream.
|
static long |
copy(InputStream input,
File output,
byte[] buffer,
long length)
Copies bytes from given input stream to given output file.
|
static long |
copy(InputStream input,
OutputStream output,
byte[] buffer,
long length)
Copies bytes from given input stream to given output stream.
|
public static long copy(InputStream input, OutputStream output, byte[] buffer, long length) throws IOException
input - the input streamoutput - the output streambuffer - a bufferlength - the maximum number of bytes to copy; any negative value for
all.IOException - if an I/O error occurspublic static long copy(File input, OutputStream output, byte[] buffer, long length) throws IOException
input - the input fileoutput - the output streambuffer - a bufferlength - the maximum number of bytes to copy; any negative for all
available bytes.IOException - if an I/O error occurspublic static long copy(InputStream input, File output, byte[] buffer, long length) throws IOException
input - the input streamoutput - the output filebuffer - a bufferlength - the maximum number of bytes to copy; any negative for all
available bytes.IOException - if an I/O error occurspublic static long copy(File input, File output, byte[] buffer, long length) throws IOException
input - the input fileoutput - the output filebuffer - a bufferlength - the maximum number of bytes to copy; any negative for all
available bytes.IOException - if an I/O error occursCopyright © 2011-2013. All Rights Reserved.