Class GoogleCloudStorageWriteChannel

    • Constructor Detail

      • GoogleCloudStorageWriteChannel

        public 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.
        Parameters:
        gcs - storage object instance
        uploadThreadPool - thread pool to use for running the upload operation
        requestHelper - a ClientRequestHelper to set extra headers
        channelOptions - write channel options
        resourceId - object to create
        createOptions - object creation options
        writeConditions - conditions on which write should be allowed to continue
    • Method Detail

      • createResponseFromException

        public com.google.api.services.storage.model.StorageObject createResponseFromException​(IOException e)
        Derived classes may optionally intercept an IOException thrown from the execute() method of a prepared request that came from createRequest(com.google.api.client.http.InputStreamContent), and return a reconstituted "response" object if the IOException can be handled as a success; for example, if the caller already has an identifier for an object, and the response is used solely for obtaining the same identifier, and the IOException is a handled "409 Already Exists" type of exception, then the derived class may override this method to return the expected "identifier" response. Return null to let the exception propagate through correctly.
      • getContentType

        protected String getContentType()