public final class IOUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
UTF8
Represents the UTF-8 character set.
|
Modifier and Type | Method and Description |
---|---|
static void |
closeQuietly(AutoCloseable closeable)
Closes any AutoCloseable object, while suppressing any IOExceptions it will generate.
|
static void |
closeQuietlyIfCloseable(Object closeable)
Closes any object if that object implements
AutoCloseable , while suppressing any IOExceptions it will
generate. |
public static final Charset UTF8
public static void closeQuietly(AutoCloseable closeable)
closeable
may be null
, in which case nothing happens.closeable
- the object to be closedpublic static void closeQuietlyIfCloseable(Object closeable)
AutoCloseable
, while suppressing any IOExceptions it will
generate. The given closeable
may be null
, in which case nothing happens.closeable
- the object to be closedCopyright © 2010–2024. All rights reserved.