public class InMemoryObjectEntry extends Object
| Constructor and Description |
|---|
InMemoryObjectEntry(String bucketName,
String objectName,
long createTimeMillis,
String contentType,
Map<String,byte[]> metadata) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBucketName()
Returns the bucketName initially provided at construction-time of this InMemoryObjectEntry; it
will never change over the lifetime of this InMemoryObjectEntry.
|
GoogleCloudStorageItemInfo |
getInfo()
Gets the
GoogleCloudStorageItemInfo associated with this InMemoryObjectEntry, whose
'size' is only updated when the initial writer has finished closing the channel. |
String |
getObjectName()
Returns the objectName initially provided at construction-time of this InMemoryObjectEntry; it
will never change over the lifetime of this InMemoryObjectEntry.
|
SeekableByteChannel |
getReadChannel()
Returns a SeekableByteChannel pointing at this InMemoryObjectEntry's byte contents;
a previous writer must have already closed the associated WritableByteChannel to commit
the byte contents and make them available for reading.
|
InMemoryObjectEntry |
getShallowCopy(String bucketName,
String objectName)
Returns a copy of this InMemoryObjectEntry which shares the underlying completedContents data;
it is illegal to call this method if the write channel has not yet been closed.
|
WritableByteChannel |
getWriteChannel()
Returns a WritableByteChannel for this InMemoryObjectEntry's byte contents; the same channel is
returned on each call, and it is illegal to call this method if the channel has ever been
closed already.
|
void |
patchMetadata(Map<String,byte[]> newMetadata)
Updates the metadata associated with this InMemoryObjectEntry.
|
public String getObjectName()
public String getBucketName()
public InMemoryObjectEntry getShallowCopy(String bucketName, String objectName) throws IOException
IOExceptionpublic WritableByteChannel getWriteChannel() throws IOException
IOExceptionpublic SeekableByteChannel getReadChannel() throws IOException
IOExceptionpublic GoogleCloudStorageItemInfo getInfo() throws IOException
GoogleCloudStorageItemInfo associated with this InMemoryObjectEntry, whose
'size' is only updated when the initial writer has finished closing the channel.IOExceptionpublic void patchMetadata(Map<String,byte[]> newMetadata) throws IOException
IOExceptionCopyright © 2016. All rights reserved.