public abstract class ObjectPositionReader extends Object implements PositionReader
Modifier and Type | Field and Description |
---|---|
protected String |
mBucketName
Name of the bucket the object resides in.
|
protected long |
mFileLength
Length of the file.
|
protected String |
mPath
Path of the file when it is uploaded to object storage.
|
Constructor and Description |
---|
ObjectPositionReader(String bucketName,
String path,
long fileLength) |
Modifier and Type | Method and Description |
---|---|
protected abstract InputStream |
openObjectInputStream(long position,
int bytesToRead) |
int |
readInternal(long position,
ReadTargetBuffer buffer,
int length) |
protected final String mPath
protected final long mFileLength
protected final String mBucketName
public int readInternal(long position, ReadTargetBuffer buffer, int length) throws IOException
readInternal
in interface PositionReader
position
- position of the file to start reading databuffer
- target byte bufferlength
- bytes to readIOException
protected abstract InputStream openObjectInputStream(long position, int bytesToRead) throws IOException
position
- position of the file to start reading databytesToRead
- bytes to readIOException
Copyright © 2023. All Rights Reserved.