Class SingleBodyBuilder


  • public class SingleBodyBuilder
    extends java.lang.Object
    Builder for TextBody and BinaryBody instances.
    • Field Detail

      • text

        private java.lang.String text
      • bin

        private byte[] bin
      • charset

        private java.nio.charset.Charset charset
    • Constructor Detail

      • SingleBodyBuilder

        SingleBodyBuilder()
    • Method Detail

      • setCharset

        public SingleBodyBuilder setCharset​(java.nio.charset.Charset charset)
      • readFrom

        public SingleBodyBuilder readFrom​(java.io.InputStream in)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • readFrom

        public SingleBodyBuilder readFrom​(java.io.Reader in)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • buildText

        public TextBody buildText()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • buildBinary

        public BinaryBody buildBinary()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • build

        public SingleBody build()
                         throws java.io.IOException
        Throws:
        java.io.IOException