Package jodd.http
Class Buffer
- java.lang.Object
-
- jodd.http.Buffer
-
public class Buffer extends java.lang.ObjectHolds request/response content until it is actually send. File content (i.e.Uploadable) is not read until it is really used.
-
-
Constructor Summary
Constructors Constructor Description Buffer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bufferappend(char c)Appends a char.Bufferappend(int number)Appends a number.Bufferappend(java.lang.String string)Appends string content to buffer.Bufferappend(Buffer buffer)Appends other buffer to this one.Bufferappend(Uploadable uploadable)AppendsUploadableto buffer.private voidensureLast()Ensures that last buffer exist.intsize()Returns buffer size.voidwriteTo(java.io.OutputStream out)Writes content to the output stream.voidwriteTo(java.io.OutputStream out, HttpProgressListener progressListener)Writes content to the output stream, using progress listener to track the sending progress.voidwriteTo(java.io.Writer writer)Writes content to the writer.
-
-
-
Method Detail
-
append
public Buffer append(java.lang.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)
AppendsUploadableto buffer.
-
size
public int size()
Returns buffer size.
-
ensureLast
private void ensureLast()
Ensures that last buffer exist.
-
writeTo
public void writeTo(java.io.Writer writer) throws java.io.IOExceptionWrites content to the writer.- Throws:
java.io.IOException
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOExceptionWrites content to the output stream.- Throws:
java.io.IOException
-
writeTo
public void writeTo(java.io.OutputStream out, HttpProgressListener progressListener) throws java.io.IOExceptionWrites content to the output stream, using progress listener to track the sending progress.- Throws:
java.io.IOException
-
-