public abstract class Streams extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BUFFER_SIZE |
| Constructor and Description |
|---|
Streams() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(byte[] in,
File out)
Copy the contents of the given byte array to the given output File.
|
static void |
copy(byte[] in,
OutputStream out)
Copy the contents of the given byte array to the given OutputStream.
|
static long |
copy(File in,
File out)
Copy the contents of the given input File to the given output File.
|
static long |
copy(InputStream in,
OutputStream out) |
static long |
copy(InputStream in,
OutputStream out,
byte[] buffer)
Copy the contents of the given InputStream to the given OutputStream.
|
static int |
copy(Reader in,
Writer out)
Copy the contents of the given Reader to the given Writer.
|
static void |
copy(String in,
Writer out)
Copy the contents of the given String to the given output Writer.
|
static byte[] |
copyToByteArray(InputStream in) |
static String |
copyToString(Reader in)
Copy the contents of the given Reader into a String.
|
static String |
copyToStringFromClasspath(ClassLoader classLoader,
String path) |
static String |
copyToStringFromClasspath(String path) |
public static final int BUFFER_SIZE
public static long copy(File in, File out) throws IOException
in - the file to copy fromout - the file to copy toIOException - in case of I/O errorspublic static void copy(byte[] in,
File out)
throws IOException
in - the byte array to copy fromout - the file to copy toIOException - in case of I/O errorspublic static long copy(InputStream in, OutputStream out) throws IOException
IOExceptionpublic static long copy(InputStream in, OutputStream out, byte[] buffer) throws IOException
in - the stream to copy fromout - the stream to copy toIOException - in case of I/O errorspublic static byte[] copyToByteArray(InputStream in) throws IOException
IOExceptionpublic static void copy(byte[] in,
OutputStream out)
throws IOException
in - the byte array to copy fromout - the OutputStream to copy toIOException - in case of I/O errorspublic static int copy(Reader in, Writer out) throws IOException
in - the Reader to copy fromout - the Writer to copy toIOException - in case of I/O errorspublic static void copy(String in, Writer out) throws IOException
in - the String to copy fromout - the Writer to copy toIOException - in case of I/O errorspublic static String copyToString(Reader in) throws IOException
in - the reader to copy fromIOException - in case of I/O errorspublic static String copyToStringFromClasspath(ClassLoader classLoader, String path) throws IOException
IOExceptionpublic static String copyToStringFromClasspath(String path) throws IOException
IOExceptionCopyright © 2022. All rights reserved.