Liferay 7.0-ce-b4

com.liferay.portal.kernel.util
Class StreamUtil

java.lang.Object
  extended by com.liferay.portal.kernel.util.StreamUtil

public class StreamUtil
extends Object


Field Summary
static int BUFFER_SIZE
           
static boolean FORCE_TIO
           
 
Constructor Summary
StreamUtil()
           
 
Method Summary
static void cleanUp(boolean quite, Closeable... closeables)
           
static void cleanUp(Closeable... closeables)
           
static void transfer(InputStream inputStream, OutputStream outputStream)
           
static void transfer(InputStream inputStream, OutputStream outputStream, boolean cleanUp)
           
static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize)
           
static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp)
           
static void transfer(InputStream inputStream, OutputStream outputStream, int bufferSize, boolean cleanUp, long length)
           
static void transfer(InputStream inputStream, OutputStream outputStream, long length)
           
protected static void transferByteArray(InputStream inputStream, OutputStream outputStream, int bufferSize, long length)
           
protected static void transferFileChannel(FileChannel inputFileChannel, FileChannel outputFileChannel, long length)
           
static InputStream uncloseable(InputStream inputStream)
           
static OutputStream uncloseable(OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE

FORCE_TIO

public static final boolean FORCE_TIO
Constructor Detail

StreamUtil

public StreamUtil()
Method Detail

cleanUp

public static void cleanUp(boolean quite,
                           Closeable... closeables)

cleanUp

public static void cleanUp(Closeable... closeables)

transfer

public static void transfer(InputStream inputStream,
                            OutputStream outputStream)
                     throws IOException
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

uncloseable

public static InputStream uncloseable(InputStream inputStream)

uncloseable

public static OutputStream uncloseable(OutputStream outputStream)

transferByteArray

protected static void transferByteArray(InputStream inputStream,
                                        OutputStream outputStream,
                                        int bufferSize,
                                        long length)
                                 throws IOException
Throws:
IOException

transferFileChannel

protected static void transferFileChannel(FileChannel inputFileChannel,
                                          FileChannel outputFileChannel,
                                          long length)
                                   throws IOException
Throws:
IOException

Liferay 7.0-ce-b4