@NotThreadSafe public class S3AInputStream extends InputStream
S3ObjectInputStream
which handles skips efficiently.Constructor and Description |
---|
S3AInputStream(String bucketName,
String key,
com.amazonaws.services.s3.AmazonS3 client)
Constructor for an input stream of an object in s3 using the aws-sdk implementation to read
the data.
|
S3AInputStream(String bucketName,
String key,
com.amazonaws.services.s3.AmazonS3 client,
long position)
Constructor for an input stream of an object in s3 using the aws-sdk implementation to read
the data.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int offset,
int length) |
long |
skip(long n) |
available, mark, markSupported, reset
public S3AInputStream(String bucketName, String key, com.amazonaws.services.s3.AmazonS3 client)
bucketName
- the bucket the object resides inkey
- the path of the object to readclient
- the s3 client to use for operationspublic S3AInputStream(String bucketName, String key, com.amazonaws.services.s3.AmazonS3 client, long position)
bucketName
- the bucket the object resides inkey
- the path of the object to readclient
- the s3 client to use for operationsposition
- the position to begin reading frompublic void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int offset, int length) throws IOException
read
in class InputStream
IOException
public long skip(long n)
skip
in class InputStream
Copyright © 2023. All Rights Reserved.