Class BlobHttpContent

  • All Implemented Interfaces:
    com.google.api.client.http.HttpContent, com.google.api.client.util.StreamingContent

    public class BlobHttpContent
    extends java.lang.Object
    implements com.google.api.client.http.HttpContent
    Blob-backed HttpContent.
    • Constructor Summary

      Constructors 
      Constructor Description
      BlobHttpContent​(Blob blob, java.lang.String contentType)  
      BlobHttpContent​(Blob blob, java.lang.String contentType, java.util.function.Consumer<java.lang.Long> writtenByteCountListener)
      Create a new BlobHttpClient.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getLength()  
      java.lang.String getType()  
      boolean retrySupported()  
      void writeTo​(java.io.OutputStream outputStream)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BlobHttpContent

        public BlobHttpContent​(Blob blob,
                               java.lang.String contentType)
      • BlobHttpContent

        public BlobHttpContent​(Blob blob,
                               java.lang.String contentType,
                               java.util.function.Consumer<java.lang.Long> writtenByteCountListener)
        Create a new BlobHttpClient.
        Parameters:
        blob - a blob to wrap
        contentType - the http contentType descriptor
        writtenByteCountListener - to listen for written byte feedback
    • Method Detail

      • getLength

        public long getLength()
        Specified by:
        getLength in interface com.google.api.client.http.HttpContent
      • getType

        public java.lang.String getType()
        Specified by:
        getType in interface com.google.api.client.http.HttpContent
      • retrySupported

        public boolean retrySupported()
        Specified by:
        retrySupported in interface com.google.api.client.http.HttpContent
      • writeTo

        public void writeTo​(java.io.OutputStream outputStream)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.api.client.http.HttpContent
        Specified by:
        writeTo in interface com.google.api.client.util.StreamingContent
        Throws:
        java.io.IOException