Package com.liferay.petra.io
Class StreamUtil
java.lang.Object
com.liferay.petra.io.StreamUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic byte[]toByteArray(InputStream inputStream) static StringtoString(InputStream inputStream) static StringtoString(InputStream inputStream, String charsetName) static voidtransfer(InputStream inputStream, OutputStream outputStream) static voidtransfer(InputStream inputStream, OutputStream outputStream, boolean cleanUp) static voidtransfer(InputStream inputStream, OutputStream outputStream, int bufferSize) static voidtransfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp) static voidtransfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp, long length) static voidtransfer(InputStream inputStream, OutputStream outputStream, long length)
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZE -
FORCE_TIO
public static final boolean FORCE_TIO
-
-
Constructor Details
-
StreamUtil
public StreamUtil()
-
-
Method Details
-
cleanUp
- Throws:
IOException
-
toByteArray
- Throws:
IOException
-
toString
- Throws:
IOException
-
toString
- Throws:
IOException
-
transfer
- Throws:
IOException
-
transfer
public static void transfer(InputStream inputStream, OutputStream outputStream, boolean cleanUp) throws IOException - Throws:
IOException
-
transfer
public static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize) throws IOException - Throws:
IOException
-
transfer
public static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp) throws IOException - Throws:
IOException
-
transfer
public static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp, long length) throws IOException - Throws:
IOException
-
transfer
public static void transfer(InputStream inputStream, OutputStream outputStream, long length) throws IOException - Throws:
IOException
-