public class LocalDirReader extends Object implements FileReader
EOF| Constructor and Description |
|---|
LocalDirReader(String path) |
| Modifier and Type | Method and Description |
|---|---|
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 in interface FileReaderpublic int readFile(ByteBufferCollector buf, String fileName, long offset, long maxCount) throws IOException, RetryAgainException
FileReaderreadFile in interface 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
IOExceptionRetryAgainExceptionCopyright © 2024. All rights reserved.