|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.common.io.IOUtils
public final class IOUtils
Utility methods for IO operations.
Field Summary | |
---|---|
static Charset |
UTF8
Represents the UTF-8 character set. |
Method Summary | |
---|---|
static void |
closeIfCloseable(Object closeable)
Close the given closeable if it implements the Closeable interface. |
static void |
closeQuietly(Closeable closeable)
Closes any Closable object, while suppressing any IOExceptions it will generate. |
static void |
closeQuietlyIfCloseable(Object closeable)
Closes any object if that object implements Closeable , while suppressing any IOExceptions it will
generate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Charset UTF8
Method Detail |
---|
public static void closeQuietly(Closeable closeable)
closeable
may be null
, in which case nothing happens.
closeable
- the object to be closedpublic static void closeQuietlyIfCloseable(Object closeable)
Closeable
, while suppressing any IOExceptions it will
generate. The given closeable
may be null
, in which case nothing happens.
closeable
- the object to be closedpublic static void closeIfCloseable(Object closeable) throws IOException
closeable
if it implements the Closeable
interface. Otherwise, nothing
happens. Unlike closeQuietlyIfCloseable(Object)
, this method does not suppress any exceptions thrown
while attempting to close the resource.
closeable
- The object to close
IOException
- when an error occurs while closing the resource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |