public class SerializationSupport extends Object
BagDeserializers from a mime type| Modifier and Type | Field and Description |
|---|---|
protected static String |
APPLICATION_GTAR |
protected static String |
APPLICATION_GZIP |
protected static String |
APPLICATION_TAR |
protected static String |
APPLICATION_X_COMPRESSED_TAR |
protected static String |
APPLICATION_X_GTAR |
protected static String |
APPLICATION_X_GZIP |
protected static String |
APPLICATION_X_TAR |
protected static String |
APPLICATION_ZIP |
static Set<String> |
GZIP_TYPES |
static Set<String> |
TAR_TYPES |
static Set<String> |
ZIP_TYPES |
| Modifier and Type | Method and Description |
|---|---|
static BagDeserializer |
deserializerFor(Path serializedBag,
BagProfile profile)
Get a
BagDeserializer for a given content type. |
protected static Map<String,String> |
getCommonTypeMap()
Visible for testing only
Retrieve a copy of the commonTypeMap
|
static BagSerializer |
serializerFor(String contentType,
BagProfile profile)
Get a
BagSerializer for a given content type and BagProfile. |
protected static final String APPLICATION_ZIP
protected static final String APPLICATION_TAR
protected static final String APPLICATION_GTAR
protected static final String APPLICATION_X_TAR
protected static final String APPLICATION_X_GTAR
protected static final String APPLICATION_GZIP
protected static final String APPLICATION_X_GZIP
protected static final String APPLICATION_X_COMPRESSED_TAR
public static final Set<String> GZIP_TYPES
protected static Map<String,String> getCommonTypeMap()
public static BagDeserializer deserializerFor(Path serializedBag, BagProfile profile)
BagDeserializer for a given content type. Currently supported are:
zip (ZIP_TYPES) - ZipBagDeserializer
tar (TAR_TYPES) - TarBagDeserializer
tar+gz (GZIP_TYPES) - GZipBagDeserializerserializedBag - the Bag (still serialized) to get a BagDeserializer forprofile - the BagProfile to ensure that the content type is allowedBagDeserializerUnsupportedOperationException - if the content type is not supportedRuntimeException - if the BagProfile does not allow serializationpublic static BagSerializer serializerFor(String contentType, BagProfile profile)
BagSerializer for a given content type and BagProfile. It takes both a short form (zip,
tar, gzip) and long form (application/zip, application/tar) version for the content type.contentType - the content type to get a BagSerializer forprofile - the BagProfile used for validating the contentTypeBagSerializerRuntimeException - if the contentType is not supportedCopyright © 2020. All rights reserved.