Package tech.mgl.core.stream
Class MGLChannelCopier
java.lang.Object
tech.mgl.core.stream.MGLIOCopier<ReadableByteChannel,WritableByteChannel>
tech.mgl.core.stream.MGLChannelCopier
-
Field Summary
Fields inherited from class tech.mgl.core.stream.MGLIOCopier
bufferSize, count, flushEveryBuffer, progress -
Constructor Summary
ConstructorsConstructorDescription构造MGLChannelCopier(int bufferSize) 构造MGLChannelCopier(int bufferSize, long count) 构造MGLChannelCopier(int bufferSize, long count, MGLStreamProgress progress) 构造 -
Method Summary
Modifier and TypeMethodDescriptionlongcopy(ReadableByteChannel source, WritableByteChannel target) 执行拷贝Methods inherited from class tech.mgl.core.stream.MGLIOCopier
bufferSize, setFlushEveryBuffer
-
Constructor Details
-
MGLChannelCopier
public MGLChannelCopier()构造 -
MGLChannelCopier
public MGLChannelCopier(int bufferSize) 构造- Parameters:
bufferSize- 缓存大小
-
MGLChannelCopier
public MGLChannelCopier(int bufferSize, long count) 构造- Parameters:
bufferSize- 缓存大小count- 拷贝总数
-
MGLChannelCopier
构造- Parameters:
bufferSize- 缓存大小count- 拷贝总数progress- 进度条
-
-
Method Details
-
copy
Description copied from class:MGLIOCopier执行拷贝- Specified by:
copyin classMGLIOCopier<ReadableByteChannel,WritableByteChannel> - Parameters:
source- 拷贝源,如InputStream、Reader等target- 拷贝目标,如OutputStream、Writer等- Returns:
- 拷贝的实际长度
-