Class PartPublisher

  • All Implemented Interfaces:
    java.net.http.HttpRequest.BodyPublisher, java.util.concurrent.Flow.Publisher<java.nio.ByteBuffer>

    class PartPublisher
    extends java.lang.Object
    implements java.net.http.HttpRequest.BodyPublisher
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String mediaType  
      private java.net.http.HttpRequest.BodyPublisher upstream  
    • Constructor Summary

      Constructors 
      Constructor Description
      PartPublisher​(java.net.http.HttpRequest.BodyPublisher upstream, java.lang.String mediaType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long contentLength()  
      java.lang.String mediaType()  
      void subscribe​(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)  
      • Methods inherited from class java.lang.Object

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

      • mediaType

        private final java.lang.String mediaType
      • upstream

        private final java.net.http.HttpRequest.BodyPublisher upstream
    • Constructor Detail

      • PartPublisher

        public PartPublisher​(java.net.http.HttpRequest.BodyPublisher upstream,
                             java.lang.String mediaType)
    • Method Detail

      • mediaType

        public java.lang.String mediaType()
      • contentLength

        public long contentLength()
        Specified by:
        contentLength in interface java.net.http.HttpRequest.BodyPublisher
      • subscribe

        public void subscribe​(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)
        Specified by:
        subscribe in interface java.util.concurrent.Flow.Publisher<java.nio.ByteBuffer>