Class Buffer
java.lang.Object
jodd.http.Buffer
Holds request/response content until it is actually send.
File content (i.e.
Uploadable) is
not read until it is really used.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteArrayOutputStreamprotected LinkedList<Object> protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) Appends a char.append(int number) Appends a number.Appends string content to buffer.Appends other buffer to this one.append(Uploadable uploadable) AppendsUploadableto buffer.private voidEnsures that last buffer exist.intsize()Returns buffer size.voidwriteTo(OutputStream out) Writes content to the output stream.voidwriteTo(OutputStream out, HttpProgressListener progressListener) Writes content to the output stream, using progress listener to track the sending progress.voidWrites content to the writer.
-
Field Details
-
list
-
last
-
size
protected int size
-
-
Constructor Details
-
Buffer
public Buffer()
-
-
Method Details
-
append
-
append
Appends a char. -
append
Appends a number. -
append
AppendsUploadableto buffer. -
append
-
size
public int size()Returns buffer size. -
ensureLast
private void ensureLast()Ensures that last buffer exist. -
writeTo
Writes content to the writer.- Throws:
IOException
-
writeTo
Writes content to the output stream.- Throws:
IOException
-
writeTo
Writes content to the output stream, using progress listener to track the sending progress.- Throws:
IOException
-