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