public final class CopyBytesUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(byte[] data,
String name)
Copies an in-memory byte array into the given location.
|
static long |
copy(InputStream in,
boolean inSkipClose,
OutputStream out,
boolean outSkipClose)
Copies a byte stream from the given source to the given sink.
|
static long |
copy(InputStream in,
boolean skipClose,
String out)
Copies a byte stream from the given source to the given
location.
|
static byte[] |
copy(String name)
Copies a byte stream from the given location into memory,
returning a byte array.
|
static long |
copy(String in,
OutputStream out,
boolean skipClose)
Copies a byte stream from the given location to the given sink.
|
static long |
copy(String in,
String out)
Copies a byte stream from one given location to another.
|
public static long copy(InputStream in, boolean inSkipClose, OutputStream out, boolean outSkipClose) throws I18NException
in - The byte source, as interpreted by InputStreamWrapper.InputStreamWrapper(InputStream,boolean).inSkipClose - True if the source stream should not be
closed.out - The byte sink, as interpreted by OutputStreamWrapper.OutputStreamWrapper(OutputStream,boolean).outSkipClose - True if the sink stream should not be
closed.I18NException - Thrown if there is a data read/write
error.public static long copy(String in, String out) throws I18NException
in - The name of the byte source, as interpreted by InputStreamWrapper.InputStreamWrapper(String).out - The name of the byte sink, as interpreted by OutputStreamWrapper.OutputStreamWrapper(String).I18NException - Thrown if there is a data read/write
error.public static long copy(InputStream in, boolean skipClose, String out) throws I18NException
in - The byte source, as interpreted by InputStreamWrapper.InputStreamWrapper(InputStream,boolean).skipClose - True if the source stream should not be
closed.out - The name of the byte sink, as interpreted by OutputStreamWrapper.OutputStreamWrapper(String).I18NException - Thrown if there is a data read/write
error.public static long copy(String in, OutputStream out, boolean skipClose) throws I18NException
in - The name of the byte source, as interpreted by InputStreamWrapper.InputStreamWrapper(String).out - The byte sink, as interpreted by OutputStreamWrapper.OutputStreamWrapper(OutputStream,boolean).skipClose - True if the sink stream should not be closed.I18NException - Thrown if there is a data read/write
error.public static byte[] copy(String name) throws I18NException
name - The name of the byte source, as interpreted by
InputStreamWrapper.InputStreamWrapper(String).I18NException - Thrown if there is a data read/write
error.public static void copy(byte[] data,
String name)
throws I18NException
data - The array.name - The name of the byte sink, as interpreted by OutputStreamWrapper.OutputStreamWrapper(String).I18NException - Thrown if there is a data read/write
error.Copyright © 2015. All Rights Reserved.