Class InputStreamBody

java.lang.Object
org.apache.http.entity.mime.content.AbstractContentBody
org.apache.http.entity.mime.content.InputStreamBody
All Implemented Interfaces:
ContentBody, ContentDescriptor

public class InputStreamBody extends AbstractContentBody
Binary body part backed by an input stream.
Since:
4.0
See Also:
  • Constructor Details

  • Method Details

    • getInputStream

      public InputStream getInputStream()
    • writeTo

      public void writeTo(OutputStream out) throws IOException
      Throws:
      IOException
    • getTransferEncoding

      public String getTransferEncoding()
      Description copied from interface: ContentDescriptor
      Returns the body descriptors transfer encoding.
      Returns:
      The transfer encoding. Must not be null, but "7bit", if no transfer-encoding was specified.
    • getContentLength

      public long getContentLength()
      Description copied from interface: ContentDescriptor
      Returns the body descriptors content-length.
      Returns:
      Content length, if known, or -1, to indicate the absence of a content-length header.
    • getFilename

      public String getFilename()