Class StringBodyParser

  • All Implemented Interfaces:
    BodyParser<java.lang.String>

    public class StringBodyParser
    extends java.lang.Object
    implements BodyParser<java.lang.String>
    A body parser reading the full body and storing it in a string. The raw buffer of the body is appended into a String.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String parseBody​(java.io.InputStream inputStream, java.lang.String contentType)
      Parse the body.
      • Methods inherited from class java.lang.Object

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

      • StringBodyParser

        public StringBodyParser()
    • Method Detail

      • parseBody

        public java.lang.String parseBody​(java.io.InputStream inputStream,
                                          @Nullable
                                          java.lang.String contentType)
                                   throws java.io.IOException
        Description copied from interface: BodyParser
        Parse the body.
        Specified by:
        parseBody in interface BodyParser<java.lang.String>
        Parameters:
        inputStream - the body InputStream.
        contentType - the "content-type" header of the request.
        Returns:
        the body.
        Throws:
        java.io.IOException - when an IOException occurs during the parsing.