类 StreamUtils
- java.lang.Object
-
- org.hibernate.engine.jdbc.StreamUtils
-
public class StreamUtils extends Object
Stream copying utilities- 作者:
- Steve Ebersole
-
-
字段概要
字段 修饰符和类型 字段 说明 static intDEFAULT_CHUNK_SIZEDefault size to use for reading buffers.
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static longcopy(InputStream inputStream, OutputStream outputStream)Copy the inputStream to the outputStream.static longcopy(InputStream inputStream, OutputStream outputStream, int bufferSize)Copy the inputStream to the outputStream using a buffer of the specified sizestatic longcopy(Reader reader, Writer writer)Copy the reader to the writer.static longcopy(Reader reader, Writer writer, int bufferSize)Copy the reader to the writer using a buffer of the specified size
-
-
-
字段详细资料
-
DEFAULT_CHUNK_SIZE
public static final int DEFAULT_CHUNK_SIZE
Default size to use for reading buffers.- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
copy
public static long copy(InputStream inputStream, OutputStream outputStream) throws IOException
Copy the inputStream to the outputStream. Uses a buffer of the default size (DEFAULT_CHUNK_SIZE).- 参数:
inputStream- The input stream to readoutputStream- The output stream to write to- 返回:
- The number of bytes read
- 抛出:
IOException- If a problem occurred accessing either stream
-
copy
public static long copy(InputStream inputStream, OutputStream outputStream, int bufferSize) throws IOException
Copy the inputStream to the outputStream using a buffer of the specified size- 参数:
inputStream- The input stream to readoutputStream- The output stream to write tobufferSize- The size of the buffer to use for reading- 返回:
- The number of bytes read
- 抛出:
IOException- If a problem occurred accessing either stream
-
copy
public static long copy(Reader reader, Writer writer) throws IOException
Copy the reader to the writer. Uses a buffer of the default size (DEFAULT_CHUNK_SIZE).- 参数:
reader- The reader to read fromwriter- The writer to write to- 返回:
- The number of bytes read
- 抛出:
IOException- If a problem occurred accessing reader or writer
-
copy
public static long copy(Reader reader, Writer writer, int bufferSize) throws IOException
Copy the reader to the writer using a buffer of the specified size- 参数:
reader- The reader to read fromwriter- The writer to write tobufferSize- The size of the buffer to use for reading- 返回:
- The number of bytes read
- 抛出:
IOException- If a problem occurred accessing either stream
-
-