Interface HttpContent

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getLength()
      Returns the content length or less than zero if not known.
      java.lang.String getType()
      Returns the content type or null for none.
      boolean retrySupported()
      Returns whether or not retry is supported on this content type.
      void writeTo​(java.io.OutputStream out)
      Writes the byte content to the given output stream.
    • Method Detail

      • getLength

        long getLength()
                throws java.io.IOException
        Returns the content length or less than zero if not known.
        Throws:
        java.io.IOException
      • getType

        java.lang.String getType()
        Returns the content type or null for none.
      • retrySupported

        boolean retrySupported()
        Returns whether or not retry is supported on this content type.
        Since:
        1.4
      • writeTo

        void writeTo​(java.io.OutputStream out)
              throws java.io.IOException
        Description copied from interface: StreamingContent
        Writes the byte content to the given output stream.

        Implementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the the output stream has not been closed, and will fail to work if it has been closed.

        Specified by:
        writeTo in interface StreamingContent
        Parameters:
        out - output stream
        Throws:
        java.io.IOException