|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.IOHelper
public final class IOHelper
IO helper class.
Method Summary | |
---|---|
static void |
close(Closeable closeable)
Closes the given resource if it is available. |
static void |
close(Closeable closeable,
String name)
Closes the given resource if it is available. |
static void |
close(Closeable closeable,
String name,
org.slf4j.Logger log)
Closes the given resource if it is available, logging any closing exceptions to the given log |
static int |
copy(InputStream input,
OutputStream output)
|
static int |
copy(InputStream input,
OutputStream output,
int bufferSize)
|
static void |
copyAndCloseInput(InputStream input,
OutputStream output)
|
static void |
copyAndCloseInput(InputStream input,
OutputStream output,
int bufferSize)
|
static IOException |
createIOException(String message,
Throwable cause)
Deprecated. IOException support nested exception in Java 1.6. Will be removed in Camel 3.0 |
static IOException |
createIOException(Throwable cause)
Deprecated. IOException support nested exception in Java 1.6. Will be removed in Camel 3.0 |
static String |
newStringFromBytes(byte[] bytes)
Use this function instead of new String(byte[]) to avoid surprises from non-standard default encodings. |
static String |
newStringFromBytes(byte[] bytes,
int start,
int length)
Use this function instead of new String(byte[], int, int) to avoid surprises from non-standard default encodings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String newStringFromBytes(byte[] bytes)
public static String newStringFromBytes(byte[] bytes, int start, int length)
@Deprecated public static IOException createIOException(Throwable cause)
IOException
from the given
exception and message
@Deprecated public static IOException createIOException(String message, Throwable cause)
IOException
from the given
exception and message
public static int copy(InputStream input, OutputStream output) throws IOException
IOException
public static int copy(InputStream input, OutputStream output, int bufferSize) throws IOException
IOException
public static void copyAndCloseInput(InputStream input, OutputStream output) throws IOException
IOException
public static void copyAndCloseInput(InputStream input, OutputStream output, int bufferSize) throws IOException
IOException
public static void close(Closeable closeable, String name, org.slf4j.Logger log)
closeable
- the object to closename
- the name of the resourcelog
- the log to use when reporting closure warningspublic static void close(Closeable closeable, String name)
closeable
- the object to closename
- the name of the resourcepublic static void close(Closeable closeable)
closeable
- the object to close
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |