Class FormUrlDecoder

java.lang.Object
org.jdrupes.httpcodec.util.FormUrlDecoder

public class FormUrlDecoder extends Object
A decoder for URL-encoded form data.
  • Constructor Details

  • Method Details

    • addData

      public void addData(ByteBuffer buf)
      Add the data in the buffer to the form data.

      May be invoked several times if the form data is split across several buffers.

      Parameters:
      buf - the buffer with the data
    • fields

      public Map<String,String> fields()
      Return the fields decoded from the data that has been added by addData(ByteBuffer).

      Invoking this method terminates the decoding, i.e. addData(ByteBuffer) should not be called again after this method has been invoked.

      Returns:
      the decoded fields