public class LocalDirReader extends Object implements FileReader
EOF| 构造器和说明 |
|---|
LocalDirReader(String path) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getPath()
Get the file path.
|
int |
readFile(ByteBufferCollector buf,
String fileName,
long offset,
long maxCount)
Read file into buf starts from offset at most maxCount.
|
protected int |
readFileWithMeta(ByteBufferCollector buf,
String fileName,
com.google.protobuf.Message fileMeta,
long offset,
long maxCount) |
public LocalDirReader(String path)
public String getPath()
FileReadergetPath 在接口中 FileReaderpublic int readFile(ByteBufferCollector buf, String fileName, long offset, long maxCount) throws IOException, RetryAgainException
FileReaderreadFile 在接口中 FileReaderbuf - read bytes into this buffileName - file nameoffset - the offset of filemaxCount - max read bytesIOException - if some I/O error occursRetryAgainException - if it's not allowed to read partly
or it's allowed but throughput is throttled to 0, try again.protected int readFileWithMeta(ByteBufferCollector buf, String fileName, com.google.protobuf.Message fileMeta, long offset, long maxCount) throws IOException, RetryAgainException
Copyright © 2021. All rights reserved.