Class Buffer

java.lang.Object
jodd.http.Buffer

public class Buffer extends Object
Holds request/response content until it is actually send. File content (i.e. Uploadable) is not read until it is really used.
  • Field Details

  • Constructor Details

    • Buffer

      public Buffer()
  • Method Details

    • append

      public Buffer append(String string)
      Appends string content to buffer.
    • append

      public Buffer append(char c)
      Appends a char.
    • append

      public Buffer append(int number)
      Appends a number.
    • append

      public Buffer append(Uploadable uploadable)
      Appends Uploadable to buffer.
    • append

      public Buffer append(Buffer buffer)
      Appends other buffer to this one.
    • size

      public int size()
      Returns buffer size.
    • ensureLast

      private void ensureLast()
      Ensures that last buffer exist.
    • writeTo

      public void writeTo(Writer writer) throws IOException
      Writes content to the writer.
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream out) throws IOException
      Writes content to the output stream.
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream out, HttpProgressListener progressListener) throws IOException
      Writes content to the output stream, using progress listener to track the sending progress.
      Throws:
      IOException