Class StringBody

    • Field Detail

      • content

        private final byte[] content
    • Constructor Detail

      • StringBody

        public StringBody​(java.lang.String text,
                          org.apache.hc.core5.http.ContentType contentType)
        Since:
        4.3
    • Method Detail

      • getReader

        public java.io.Reader getReader()
      • writeTo

        public void writeTo​(java.io.OutputStream out)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • 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 java.lang.String getFilename()