public class Copier extends Object
| Constructor and Description |
|---|
Copier() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(InputStream input,
OutputStream output)
Copy bytes from an
InputStream to an OutputStream. |
static void |
copy(InputStream input,
OutputStream output,
int bufferSize)
Copy bytes from an
InputStream to an OutputStream. |
static void |
copy(InputStream input,
Writer output)
Copy and convert bytes from an
InputStream to chars on a Writer. |
static void |
copy(InputStream input,
Writer output,
int bufferSize)
Copy and convert bytes from an
InputStream to chars on a Writer. |
static void |
copy(InputStream input,
Writer output,
String encoding)
Copy and convert bytes from an
InputStream to chars on a Writer, using the specified encoding. |
static void |
copy(InputStream input,
Writer output,
String encoding,
int bufferSize)
Copy and convert bytes from an
InputStream to chars on a Writer, using the specified encoding. |
static void |
copy(Reader input,
Writer output)
Copy chars from a
Reader to a Writer. |
static void |
copy(Reader input,
Writer output,
int bufferSize)
Copy chars from a
Reader to a Writer. |
public static void copy(InputStream input, OutputStream output) throws IOException
InputStream to an OutputStream.IOExceptionpublic static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException
InputStream to an OutputStream.bufferSize - Size of internal buffer to use.IOExceptionpublic static void copy(Reader input, Writer output) throws IOException
Reader to a Writer.IOExceptionpublic static void copy(Reader input, Writer output, int bufferSize) throws IOException
Reader to a Writer.bufferSize - Size of internal buffer to use.IOExceptionpublic static void copy(InputStream input, Writer output) throws IOException
InputStream to chars on a Writer.
The platform's default encoding is used for the byte-to-char conversion.IOExceptionpublic static void copy(InputStream input, Writer output, int bufferSize) throws IOException
InputStream to chars on a Writer.
The platform's default encoding is used for the byte-to-char conversion.bufferSize - Size of internal buffer to use.IOExceptionpublic static void copy(InputStream input, Writer output, String encoding) throws IOException
InputStream to chars on a Writer, using the specified encoding.encoding - The name of a supported character encoding. See the IANA Charset
Registry for a list of valid encoding types.IOExceptionpublic static void copy(InputStream input, Writer output, String encoding, int bufferSize) throws IOException
InputStream to chars on a Writer, using the specified encoding.encoding - The name of a supported character encoding. See the IANA Charset
Registry for a list of valid encoding types.bufferSize - Size of internal buffer to use.IOExceptionCopyright © 2008-2012 Sonatype. All Rights Reserved.