Package com.google.cloud.storage
Class HttpCopyWriter
java.lang.Object
com.google.cloud.storage.CopyWriter
com.google.cloud.storage.HttpCopyWriter
- All Implemented Interfaces:
Restorable<CopyWriter>
-
Method Summary
Modifier and TypeMethodDescriptioncapture()voidCopies the next chunk of the blob.longReturns the size of the blob being copied.Returns the updated information for the written blob.longReturns the number of bytes copied.booleanisDone()Returnstrueif blob copy has finished,falseotherwise.
-
Method Details
-
getResult
Description copied from class:CopyWriterReturns the updated information for the written blob. Calling this method whenisDone()isfalsewill block until all pending chunks are copied.This method has the same effect of doing:
while (!copyWriter.isDone()) { copyWriter.copyChunk(); }- Specified by:
getResultin classCopyWriter
-
getBlobSize
public long getBlobSize()Description copied from class:CopyWriterReturns the size of the blob being copied.- Specified by:
getBlobSizein classCopyWriter
-
isDone
public boolean isDone()Description copied from class:CopyWriterReturnstrueif blob copy has finished,falseotherwise.- Specified by:
isDonein classCopyWriter
-
getTotalBytesCopied
public long getTotalBytesCopied()Description copied from class:CopyWriterReturns the number of bytes copied.- Specified by:
getTotalBytesCopiedin classCopyWriter
-
copyChunk
public void copyChunk()Description copied from class:CopyWriterCopies the next chunk of the blob. An RPC is issued only if copy has not finished yet (CopyWriter.isDone()returnsfalse).- Specified by:
copyChunkin classCopyWriter
-
capture
- Specified by:
capturein interfaceRestorable<CopyWriter>- Specified by:
capturein classCopyWriter
-