public final class S3RestUtils extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
S3RestUtils.RestCallable<T>
An interface representing a callable.
|
Modifier and Type | Method and Description |
---|---|
static <T> javax.ws.rs.core.Response |
call(String resource,
S3RestUtils.RestCallable<T> callable)
Calls the given
S3RestUtils.RestCallable and handles any exceptions thrown. |
static String |
getMultipartTemporaryDirForObject(String bucketPath,
String objectKey) |
static String |
quoteETag(String etag) |
static String |
toS3Date(long epoch) |
public static <T> javax.ws.rs.core.Response call(String resource, S3RestUtils.RestCallable<T> callable)
S3RestUtils.RestCallable
and handles any exceptions thrown.T
- the return type of the callableresource
- the resource (bucket or object) to be operated oncallable
- the callable to callpublic static String getMultipartTemporaryDirForObject(String bucketPath, String objectKey)
bucketPath
- the bucket path like "/bucket", "/mount/point/bucket"objectKey
- the object key like "img/2017/9/1/s3.jpg"public static String toS3Date(long epoch)
epoch
- the milliseconds from the epochCopyright © 2023. All Rights Reserved.