|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.zookeeper.common.IOUtils
public class IOUtils
| Constructor Summary | |
|---|---|
IOUtils()
|
|
| Method Summary | |
|---|---|
static void |
cleanup(org.slf4j.Logger log,
Closeable... closeables)
Close the Closeable objects and ignore any IOException or
null pointers. |
static void |
closeStream(Closeable stream)
Closes the stream ignoring IOException. |
static void |
copyBytes(InputStream in,
OutputStream out,
int buffSize)
Copies from one stream to another. |
static void |
copyBytes(InputStream in,
OutputStream out,
int buffSize,
boolean close)
Copies from one stream to another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IOUtils()
| Method Detail |
|---|
public static void closeStream(Closeable stream)
IOException. Must only be called in
cleaning up from exception handlers.
stream - the Stream to close
public static void cleanup(org.slf4j.Logger log,
Closeable... closeables)
IOException or
null pointers. Must only be used for cleanup in exception handlers.
log - the log to record problems to at debug level. Can be null.closeables - the objects to close
public static void copyBytes(InputStream in,
OutputStream out,
int buffSize,
boolean close)
throws IOException
in - InputStrem to read fromout - OutputStream to write tobuffSize - the size of the bufferclose - whether or not close the InputStream and OutputStream at the
end. The streams are closed in the finally clause.
IOException
public static void copyBytes(InputStream in,
OutputStream out,
int buffSize)
throws IOException
in - InputStrem to read fromout - OutputStream to write tobuffSize - the size of the buffer
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||