Package org.spockframework.util
Class IoUtil
java.lang.Object
org.spockframework.util.IoUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
closeQuietly
(Closeable... closeables) static void
static void
copyStream
(InputStream in, OutputStream out) static void
createDirectory
(File dir) static String
Returns the text read from the given file as a String.static String
getText
(InputStream stream) Returns the text read from the given stream as a String.static String
Returns the text read from the given reader as a String.
-
Constructor Details
-
IoUtil
public IoUtil()
-
-
Method Details
-
closeQuietly
-
getText
Returns the text read from the given reader as a String. Closes the given reader upon return.- Throws:
IOException
-
getText
Returns the text read from the given file as a String.- Throws:
IOException
-
getText
Returns the text read from the given stream as a String. Closes the given stream upon return.- Throws:
IOException
-
createDirectory
- Throws:
IOException
-
copyStream
- Throws:
IOException
-
copyFile
- Throws:
FileNotFoundException
IOException
-