Class PathBody

  • All Implemented Interfaces:
    org.apache.http.entity.mime.content.ContentBody, org.apache.http.entity.mime.content.ContentDescriptor

    final class PathBody
    extends org.apache.http.entity.mime.content.AbstractContentBody
    Binary body part backed by a path.
    See Also:
    MultipartEntityBuilder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.file.Path path  
    • Constructor Summary

      Constructors 
      Constructor Description
      PathBody​(java.nio.file.Path path)  
      PathBody​(java.nio.file.Path path, java.lang.String contentType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getContentLength()  
      java.lang.String getFilename()  
      java.lang.String getTransferEncoding()  
      void writeTo​(java.io.OutputStream outstream)  
      • Methods inherited from class org.apache.http.entity.mime.content.AbstractContentBody

        getCharset, getContentType, getMediaType, getMimeType, getSubType
      • Methods inherited from class java.lang.Object

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

      • path

        private final java.nio.file.Path path
    • Constructor Detail

      • PathBody

        PathBody​(java.nio.file.Path path)
      • PathBody

        public PathBody​(java.nio.file.Path path,
                        java.lang.String contentType)
    • Method Detail

      • getFilename

        public java.lang.String getFilename()
      • writeTo

        public void writeTo​(java.io.OutputStream outstream)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • getTransferEncoding

        public java.lang.String getTransferEncoding()
      • getContentLength

        public long getContentLength()