Closeable objects.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | closeQuietly(InputStream
the input stream to be closed, or inputStream)null in which case this method
does nothingCloses the given |
| public static void | closeQuietly(Reader
the reader to be closed, or reader)null in which case this method does nothingCloses the given |
| logger | back to summary |
|---|---|
| pack-priv static final Logger logger
| |
| Closeables | back to summary |
|---|---|
| private Closeables() | |
| close | back to summary |
|---|---|
| public static void close(Closeable closeable, boolean swallowIOException) throws IOException Closes a If Example:
| |
| closeQuietly | back to summary |
|---|---|
| public static void closeQuietly(InputStream inputStream) Closes the given While it's not safe in the general case to ignore exceptions that are thrown when closing an
I/O resource, it should generally be safe in the case of a resource that's being used only for
reading, such as an
| |
| closeQuietly | back to summary |
|---|---|
| public static void closeQuietly(Reader reader) Closes the given While it's not safe in the general case to ignore exceptions that are thrown when closing an
I/O resource, it should generally be safe in the case of a resource that's being used only for
reading, such as a
| |