Class ProvidenceHttpBufferedContent

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

    public class ProvidenceHttpBufferedContent
    extends java.lang.Object
    implements com.google.api.client.http.HttpContent
    HTTP content wrapper for providence messages. Use this is the receiving end requires the content to have a known size before it being sent. Otherwise use ProvidenceHttpContent.
    Since:
    1.8.0
    • Constructor Detail

      • ProvidenceHttpBufferedContent

        public ProvidenceHttpBufferedContent​(@Nonnull
                                             PMessageOrBuilder message,
                                             @Nonnull
                                             Serializer serializer)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • ProvidenceHttpBufferedContent

        public ProvidenceHttpBufferedContent​(@Nonnull
                                             PServiceCall serviceCall,
                                             @Nonnull
                                             Serializer serializer)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
    • 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 out)
                     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