public class S3AInMemoryInputStream extends S3ARemoteInputStream
InputStream
that allows reading from an S3 file.
The entire file is read into memory before reads can begin.
Use of this class is recommended only for small files that can fit
entirely in memory.Constructor and Description |
---|
S3AInMemoryInputStream(S3AReadOpContext context,
S3ObjectAttributes s3Attributes,
S3AInputStream.InputStreamCallbacks client,
S3AInputStreamStatistics streamStatistics)
Initializes a new instance of the
S3AInMemoryInputStream class. |
Modifier and Type | Method and Description |
---|---|
protected boolean |
ensureCurrentBuffer()
Ensures that a non-empty valid buffer is available for immediate reading.
|
available, close, getBlockData, getContext, getFile, getFilePosition, getIOStatistics, getName, getNextReadPos, getOffsetStr, getPos, getReader, getS3AStreamStatistics, getS3File, getS3ObjectAttributes, hasCapability, isClosed, mark, markSupported, read, read, read, reset, seek, setReadahead, skip, throwIfClosed, throwIfInvalidSeek, toString
public S3AInMemoryInputStream(S3AReadOpContext context, S3ObjectAttributes s3Attributes, S3AInputStream.InputStreamCallbacks client, S3AInputStreamStatistics streamStatistics)
S3AInMemoryInputStream
class.context
- read-specific operation context.s3Attributes
- attributes of the S3 object being read.client
- callbacks used for interacting with the underlying S3 client.streamStatistics
- statistics for this stream.IllegalArgumentException
- if context is null.IllegalArgumentException
- if s3Attributes is null.IllegalArgumentException
- if client is null.protected boolean ensureCurrentBuffer() throws IOException
ensureCurrentBuffer
in class S3ARemoteInputStream
IOException
- if there is an IO error during this operation.Copyright © 2008–2024 Apache Software Foundation. All rights reserved.