public class BmcInMemoryFSInputStream extends BmcFSInputStream
FSInputStream
implementation that backs the entire file into memory (using a byte array).closed, currentPosition, objectStorage, requestBuilder, sourceInputStream, statistics, status
Constructor and Description |
---|
BmcInMemoryFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage,
FileStatus status,
Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder,
FileSystem.Statistics statistics) |
Modifier and Type | Method and Description |
---|---|
protected long |
doSeek(long position)
Perform the requested seek operation.
|
protected InputStream |
wrap(InputStream rawInputStream)
Allows the subclass to wrap the raw input stream from Casper in another one if desired.
|
available, close, getPos, getSourceInputStream, getStatistics, read, read, seek, seekToNewSource, setSourceInputStream, validateState
read, readFully, readFully, toString, validatePositionedReadArgs
mark, markSupported, read, reset, skip
public BmcInMemoryFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage, FileStatus status, Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder, FileSystem.Statistics statistics)
protected long doSeek(long position) throws IOException
BmcFSInputStream
BmcFSInputStream.setSourceInputStream(InputStream)
before returning. The input stream that was
originally created (and wrapped by BmcFSInputStream.wrap(InputStream)
can be obtained from
BmcFSInputStream.getSourceInputStream()
.doSeek
in class BmcFSInputStream
position
- The position to seek to.IOException
- if the operation could not be completedprotected InputStream wrap(InputStream rawInputStream) throws IOException
BmcFSInputStream
wrap
in class BmcFSInputStream
rawInputStream
- The raw input stream.IOException
- if the operation could not be completed.Copyright © 2016–2023. All rights reserved.