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 voidcloseQuietly(Socket... sockets) static voidstatic voidcopyStream(InputStream in, OutputStream out) static voidcreateDirectory(File dir) static StringgetFileExtension(String filename) 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.listFilesRecursively(File baseDir) static voidstopQuietly(IStoppable... stoppables)
-
Constructor Details
-
IoUtil
public IoUtil()
-
-
Method Details
-
closeQuietly
-
closeQuietly
-
stopQuietly
-
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
-
listFilesRecursively
- Throws:
IOException
-
getFileExtension
-