Class HttpCopyWriter

java.lang.Object
com.google.cloud.storage.CopyWriter
com.google.cloud.storage.HttpCopyWriter
All Implemented Interfaces:
com.google.cloud.Restorable<CopyWriter>

public class HttpCopyWriter extends CopyWriter
  • Method Details

    • getResult

      public Blob getResult()
      Description copied from class: CopyWriter
      Returns the updated information for the written blob. Calling this method when isDone() is false will block until all pending chunks are copied.

      This method has the same effect of doing:

      
       while (!copyWriter.isDone()) {
          copyWriter.copyChunk();
       }
       
      Specified by:
      getResult in class CopyWriter
    • getBlobSize

      public long getBlobSize()
      Description copied from class: CopyWriter
      Returns the size of the blob being copied.
      Specified by:
      getBlobSize in class CopyWriter
    • isDone

      public boolean isDone()
      Description copied from class: CopyWriter
      Returns true if blob copy has finished, false otherwise.
      Specified by:
      isDone in class CopyWriter
    • getTotalBytesCopied

      public long getTotalBytesCopied()
      Description copied from class: CopyWriter
      Returns the number of bytes copied.
      Specified by:
      getTotalBytesCopied in class CopyWriter
    • copyChunk

      public void copyChunk()
      Description copied from class: CopyWriter
      Copies the next chunk of the blob. An RPC is issued only if copy has not finished yet (CopyWriter.isDone() returns false).
      Specified by:
      copyChunk in class CopyWriter
    • capture

      public com.google.cloud.RestorableState<CopyWriter> capture()
      Specified by:
      capture in interface com.google.cloud.Restorable<CopyWriter>
      Specified by:
      capture in class CopyWriter