Package org.spockframework.util
Class IoUtil
java.lang.Object
org.spockframework.util.IoUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcloseQuietly(Closeable... closeables) static voidstatic voidcopyStream(InputStream in, OutputStream out) static voidcreateDirectory(File dir) static StringReturns the text read from the given file as a String.static StringgetText(InputStream stream) Returns the text read from the given stream as a String.static StringReturns 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:
FileNotFoundExceptionIOException
-