public final class IOs extends Object
Modifier and Type | Method and Description |
---|---|
static void |
closeQuietly(Closeable closeable)
Close instance of
Closeable object (stream, reader, writer, etc.). |
static void |
readInputStream(InputStream is,
StreamVisitor visitor)
Read input and continue until
StreamVisitor.readLine(String) returns false . |
public static void readInputStream(InputStream is, StreamVisitor visitor) throws IOException
StreamVisitor.readLine(String)
returns false
.is
- Input stream.visitor
- Result handler.IOException
- If an error occurred during read operation.public static void closeQuietly(Closeable closeable)
Closeable
object (stream, reader, writer, etc.).
If an IOException
occurs during the close operation, then it is logged but it
will not fail by throwing another exception.closeable
- Closeable instance.Copyright © 2016. All Rights Reserved.