Package com.predic8.membrane.core.http
Class Chunk
java.lang.Object
com.predic8.membrane.core.http.Chunk
A chunk of a HTTP message body.
Also see Chunked Transfer Encoding .
Used (independently of whether "Transfer-Encoding: chunked" is actually present) to store the message body's data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcopyChunk(byte[] raw, int destPos) intcopyChunkLength(byte[] raw, int destPos, AbstractBody body) byte[]inttoString()Supposes UTF-8 encoding.voidwrite(OutputStream out)
-
Constructor Details
-
Chunk
public Chunk(byte[] content)
-
-
Method Details
-
getContent
public byte[] getContent() -
getLength
public int getLength() -
write
- Throws:
IOException
-
toString
Supposes UTF-8 encoding. Should therefore not be used for primary functionality. -
copyChunk
public int copyChunk(byte[] raw, int destPos) -
copyChunkLength
-