public class StreamCopier extends IoCopier<InputStream,OutputStream>
InputStream
向 OutputStream
拷贝bufferSize, count, flushEveryBuffer, progress
Constructor and Description |
---|
StreamCopier()
构造
|
StreamCopier(int bufferSize)
构造
|
StreamCopier(int bufferSize,
long count)
构造
|
StreamCopier(int bufferSize,
long count,
StreamProgress progress)
构造
|
Modifier and Type | Method and Description |
---|---|
long |
copy(InputStream source,
OutputStream target)
执行拷贝
|
bufferSize, setFlushEveryBuffer
public StreamCopier()
public StreamCopier(int bufferSize)
bufferSize
- 缓存大小public StreamCopier(int bufferSize, long count)
bufferSize
- 缓存大小count
- 拷贝总数public StreamCopier(int bufferSize, long count, StreamProgress progress)
bufferSize
- 缓存大小count
- 拷贝总数progress
- 进度条public long copy(InputStream source, OutputStream target)
IoCopier
copy
in class IoCopier<InputStream,OutputStream>
source
- 拷贝源,如InputStream、Reader等target
- 拷贝目标,如OutputStream、Writer等Copyright © 2024. All rights reserved.