Package org.mockito.internal.util.io
Class IOUtil
java.lang.Object
org.mockito.internal.util.io.IOUtil
IO utils. A bit of reinventing the wheel but we don't want extra dependencies at this stage and
we want to be java.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Closes the target.static void
closeQuietly
(Closeable closeable) Closes the target.static Collection
<String> readLines
(InputStream is) Reads all lines from the given stream.static void
Writes text to file in UTF-8.
-
Constructor Details
-
IOUtil
private IOUtil()
-
-
Method Details
-
writeText
Writes text to file in UTF-8. -
readLines
Reads all lines from the given stream. Uses UTF-8. -
closeQuietly
Closes the target. Does nothing when target is null. Is silent.- Parameters:
closeable
- the target, may be null
-
close
Closes the target. Does nothing when target is null. Is not silent and exceptions are rethrown.- Parameters:
closeable
- the target, may be null
-