|
||||||||||
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(java.io.Closeable closeable)
Closes the given resource if it is available. |
static void |
close(java.io.Closeable closeable,
java.lang.String name)
Closes the given resource if it is available. |
static void |
close(java.io.Closeable closeable,
java.lang.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(java.io.InputStream input,
java.io.OutputStream output)
|
static int |
copy(java.io.InputStream input,
java.io.OutputStream output,
int bufferSize)
|
static void |
copyAndCloseInput(java.io.InputStream input,
java.io.OutputStream output)
|
static void |
copyAndCloseInput(java.io.InputStream input,
java.io.OutputStream output,
int bufferSize)
|
static java.io.IOException |
createIOException(java.lang.String message,
java.lang.Throwable cause)
Deprecated. IOException support nested exception in Java 1.6. Will be removed in Camel 3.0 |
static java.io.IOException |
createIOException(java.lang.Throwable cause)
Deprecated. IOException support nested exception in Java 1.6. Will be removed in Camel 3.0 |
static java.lang.String |
newStringFromBytes(byte[] bytes)
Use this function instead of new String(byte[]) to avoid surprises from non-standard default encodings. |
static java.lang.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 java.lang.String newStringFromBytes(byte[] bytes)
public static java.lang.String newStringFromBytes(byte[] bytes, int start, int length)
@Deprecated public static java.io.IOException createIOException(java.lang.Throwable cause)
IOException
from the given
exception and message
@Deprecated public static java.io.IOException createIOException(java.lang.String message, java.lang.Throwable cause)
IOException
from the given
exception and message
public static int copy(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static int copy(java.io.InputStream input, java.io.OutputStream output, int bufferSize) throws java.io.IOException
java.io.IOException
public static void copyAndCloseInput(java.io.InputStream input, java.io.OutputStream output) throws java.io.IOException
java.io.IOException
public static void copyAndCloseInput(java.io.InputStream input, java.io.OutputStream output, int bufferSize) throws java.io.IOException
java.io.IOException
public static void close(java.io.Closeable closeable, java.lang.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(java.io.Closeable closeable, java.lang.String name)
closeable
- the object to closename
- the name of the resourcepublic static void close(java.io.Closeable closeable)
closeable
- the object to close
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |