Package org.mockito.internal.util.io
Class IOUtil
- java.lang.Object
-
- org.mockito.internal.util.io.IOUtil
-
public final class IOUtil extends java.lang.Object
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 Modifier Constructor Description private
IOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(java.io.Closeable closeable)
Closes the target.static void
closeQuietly(java.io.Closeable closeable)
Closes the target.static java.util.Collection<java.lang.String>
readLines(java.io.InputStream is)
static void
writeText(java.lang.String text, java.io.File output)
Writes text to file
-
-
-
Method Detail
-
writeText
public static void writeText(java.lang.String text, java.io.File output)
Writes text to file
-
readLines
public static java.util.Collection<java.lang.String> readLines(java.io.InputStream is)
-
closeQuietly
public static void closeQuietly(java.io.Closeable closeable)
Closes the target. Does nothing when target is null. Is silent.- Parameters:
closeable
- the target, may be null
-
close
public static void close(java.io.Closeable closeable)
Closes the target. Does nothing when target is null. Is not silent and exceptions are rethrown.- Parameters:
closeable
- the target, may be null
-
-