Package com.logicaldoc.util.io
Class IOUtil
java.lang.Object
com.logicaldoc.util.io.IOUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidClose the given resource.static byte[]getBytesOfStream(InputStream stream) static InputStreamgetLimitedStream(InputStream input, long limit) Creates a new input stream that represents the first part of the original stream.static Stringstatic voidwrite(InputStream input, File output) static voidwrite(InputStream input, OutputStream output)
-
Method Details
-
close
Close the given resource.- Parameters:
resource- The resource to be closed.
-
getLimitedStream
Creates a new input stream that represents the first part of the original stream.- Parameters:
input- Original input streamlimit- Size of the new stream, expressed in bytes- Returns:
- the limited input stream
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
readStream
- Throws:
IOException
-
getBytesOfStream
- Throws:
IOException
-