public class S3InputFile extends java.lang.Object implements InputFile, NativelyEncryptedFile
Modifier and Type | Method and Description |
---|---|
AwsProperties |
awsProperties() |
boolean |
exists()
Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
|
static S3InputFile |
fromLocation(java.lang.String location,
long length,
software.amazon.awssdk.services.s3.S3Client client,
AwsProperties awsProperties,
MetricsContext metrics) |
static S3InputFile |
fromLocation(java.lang.String location,
software.amazon.awssdk.services.s3.S3Client client,
AwsProperties awsProperties,
MetricsContext metrics) |
long |
getLength()
Note: this may be stale if file was deleted since metadata is cached for size/existence checks.
|
protected software.amazon.awssdk.services.s3.model.HeadObjectResponse |
getObjectMetadata() |
java.lang.String |
location() |
protected MetricsContext |
metrics() |
NativeFileCryptoParameters |
nativeCryptoParameters() |
SeekableInputStream |
newStream()
Opens a new
SeekableInputStream for the underlying data file |
void |
setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters) |
java.lang.String |
toString() |
public static S3InputFile fromLocation(java.lang.String location, software.amazon.awssdk.services.s3.S3Client client, AwsProperties awsProperties, MetricsContext metrics)
public static S3InputFile fromLocation(java.lang.String location, long length, software.amazon.awssdk.services.s3.S3Client client, AwsProperties awsProperties, MetricsContext metrics)
public long getLength()
public SeekableInputStream newStream()
InputFile
SeekableInputStream
for the underlying data filepublic NativeFileCryptoParameters nativeCryptoParameters()
nativeCryptoParameters
in interface NativelyEncryptedFile
public void setNativeCryptoParameters(NativeFileCryptoParameters nativeCryptoParameters)
setNativeCryptoParameters
in interface NativelyEncryptedFile
public java.lang.String location()
public AwsProperties awsProperties()
protected MetricsContext metrics()
public boolean exists()
protected software.amazon.awssdk.services.s3.model.HeadObjectResponse getObjectMetadata() throws software.amazon.awssdk.services.s3.model.S3Exception
software.amazon.awssdk.services.s3.model.S3Exception
public java.lang.String toString()
toString
in class java.lang.Object