Package com.logicaldoc.util.io
Class IOUtil
java.lang.Object
com.logicaldoc.util.io.IOUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Close the given resource.static InputStream
getLimitedStream
(InputStream input, long limit) Creates a new input stream that represents the first part of the original stream.static String
static byte[]
printIS
(InputStream stream) static void
write
(InputStream input, File output) static void
write
(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
-
getStringFromInputStream
- Throws:
IOException
-
printIS
- Throws:
IOException
-