public class GoogleCloudStorageWriteChannel extends AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject> implements GoogleCloudStorageItemInfo.Provider
channelOptions, logger, threadPool, uploadOperation| Constructor and Description |
|---|
GoogleCloudStorageWriteChannel(com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
ExecutorService uploadThreadPool,
AsyncWriteChannelOptions channelOptions,
StorageResourceId resourceId,
CreateObjectOptions createOptions,
ObjectWriteConditions writeConditions)
Constructs an instance of GoogleCloudStorageWriteChannel.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.api.services.storage.Storage.Objects.Insert |
createRequest(com.google.api.client.http.InputStreamContent inputStream) |
protected String |
getContentType() |
GoogleCloudStorageItemInfo |
getItemInfo()
Returns non-null only if close() has been called and the underlying object has been
successfully committed.
|
protected String |
getResourceString() |
void |
handleResponse(com.google.api.services.storage.model.StorageObject response) |
startUploadclose, createResponseFromException, initialize, isDirectUploadEnabled, isOpen, writepublic GoogleCloudStorageWriteChannel(com.google.api.services.storage.Storage gcs,
ClientRequestHelper<com.google.api.services.storage.model.StorageObject> requestHelper,
ExecutorService uploadThreadPool,
AsyncWriteChannelOptions channelOptions,
StorageResourceId resourceId,
CreateObjectOptions createOptions,
ObjectWriteConditions writeConditions)
gcs - storage object instanceuploadThreadPool - thread pool to use for running the upload operationrequestHelper - a ClientRequestHelper to set extra headerschannelOptions - write channel optionsresourceId - object to createcreateOptions - object creation optionswriteConditions - conditions on which write should be allowed to continuepublic com.google.api.services.storage.Storage.Objects.Insert createRequest(com.google.api.client.http.InputStreamContent inputStream)
throws IOException
createRequest in class AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject>IOExceptionpublic void handleResponse(com.google.api.services.storage.model.StorageObject response)
handleResponse in class BaseAbstractGoogleAsyncWriteChannel<com.google.api.services.storage.model.StorageObject>protected String getContentType()
getContentType in class AbstractGoogleAsyncWriteChannel<com.google.api.services.storage.Storage.Objects.Insert,com.google.api.services.storage.model.StorageObject>protected String getResourceString()
getResourceString in class BaseAbstractGoogleAsyncWriteChannel<com.google.api.services.storage.model.StorageObject>public GoogleCloudStorageItemInfo getItemInfo()
getItemInfo in interface GoogleCloudStorageItemInfo.ProviderCopyright © 2022. All rights reserved.