public final class S3RestUtils
extends java.lang.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(java.lang.String resource,
S3RestUtils.RestCallable<T> callable)
Calls the given
S3RestUtils.RestCallable and handles any exceptions thrown. |
static java.lang.String |
getMultipartTemporaryDirForObject(java.lang.String bucketPath,
java.lang.String objectKey) |
static java.lang.String |
quoteETag(java.lang.String etag) |
static java.lang.String |
toS3Date(long epoch) |
public static <T> javax.ws.rs.core.Response call(java.lang.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 java.lang.String getMultipartTemporaryDirForObject(java.lang.String bucketPath,
java.lang.String objectKey)
bucketPath - the bucket path like "/bucket", "/mount/point/bucket"objectKey - the object key like "img/2017/9/1/s3.jpg"public static java.lang.String toS3Date(long epoch)
epoch - the milliseconds from the epochpublic static java.lang.String quoteETag(java.lang.String etag)
etag - the entity tag to be used in the ETag field in the HTTP headerCopyright © 2021. All Rights Reserved.