public class CreateObjectOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static CreateObjectOptions |
DEFAULT |
static String |
DEFAULT_CONTENT_TYPE |
static Map<String,byte[]> |
EMPTY_METADATA |
| Constructor and Description |
|---|
CreateObjectOptions(boolean overwriteExisting)
Construct a new CreateObjectOptions with empty metadata and the default content-type.
|
CreateObjectOptions(boolean overwriteExisting,
Map<String,byte[]> metadata)
Construct a new CreateObjectOptions with the specified metadata, and default content-type.
|
CreateObjectOptions(boolean overwriteExisting,
String contentType,
Map<String,byte[]> metadata)
Construct a new CreateObjectOptions with the spec metadata and content-type.
|
CreateObjectOptions(boolean overwriteExisting,
String contentType,
Map<String,byte[]> metadata,
boolean requireMetadataMatchForEmptyObjects)
Construct a new CreateObjectOptions with the spec metadata and content-type.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Content type to set when creating a file.
|
Map<String,byte[]> |
getMetadata()
Custom metadata to apply to this object.
|
boolean |
getRequireMetadataMatchForEmptyObjects()
See constructor param for details.
|
boolean |
overwriteExisting()
Get the value of overwriteExisting.
|
public static final String DEFAULT_CONTENT_TYPE
public static final CreateObjectOptions DEFAULT
public CreateObjectOptions(boolean overwriteExisting)
overwriteExisting - True to overwrite any existing objects with the same name.public CreateObjectOptions(boolean overwriteExisting,
Map<String,byte[]> metadata)
overwriteExisting - True to overwrite any existing objects with the same name.metadata - A dictionary of metadata to apply to created objects.public CreateObjectOptions(boolean overwriteExisting,
String contentType,
Map<String,byte[]> metadata)
overwriteExisting - True to overwrite any existing objects with the same namecontentType - content-type for the created filemetadata - A dictionary of metadata to apply to created objectspublic CreateObjectOptions(boolean overwriteExisting,
String contentType,
Map<String,byte[]> metadata,
boolean requireMetadataMatchForEmptyObjects)
overwriteExisting - True to overwrite any existing objects with the same namecontentType - content-type for the created filemetadata - A dictionary of metadata to apply to created objectsrequireMetadataMatchForEmptyObjects - if true, when creating an empty object and
certain types of errors occur, any existing object is checked for an exact metadata
match to the metadata in this CreateObjectOptions before accepting the creation as
successful. If false, then on error for creating empty objects, as long as an
appropriate empty object already exists, even if it holds different metadata than
provided in this CreateObjectOptions instance, it may be considered created
successfully.public boolean overwriteExisting()
public String getContentType()
public boolean getRequireMetadataMatchForEmptyObjects()
Copyright © 2016. All rights reserved.