public class FileChunkReader extends Object implements Closeable
RaftProtos.FileChunkProtos from a file.| 构造器和说明 |
|---|
FileChunkReader(FileInfo info,
Path relativePath)
Construct a reader from a file specified by the given
FileInfo. |
public FileChunkReader(FileInfo info, Path relativePath) throws IOException
FileInfo.info - the information of the file.relativePath - the relative path of the file.IOException - if it failed to open the file.public org.apache.ratis.proto.RaftProtos.FileChunkProto readFileChunk(int chunkMaxSize) throws IOException
chunkMaxSize - maximum chunk sizeIOException - if it failed to read the file.public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2017–2022 The Apache Software Foundation. All rights reserved.