public class Body extends AbstractBody
ChunkedBody
instead, if
"Transfer-Encoding: chunked" is set on the input.
The "Transfer-Encoding" of the output is not determined by this class hierarchy, but by
AbstractBodyTransferrer
and its subclasses.
The caller is responsible to adjust the header accordingly,
e.g. the fields Transfer-Encoding and Content-Length.chunks
Constructor and Description |
---|
Body(byte[] content) |
Body(InputStream in) |
Body(InputStream in,
int length) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
getRawLocal() |
protected void |
readLocal() |
protected void |
writeAlreadyRead(AbstractBodyTransferrer out) |
protected void |
writeNotRead(AbstractBodyTransferrer out) |
getBodyAsStream, getContent, getLength, getRaw, getRawLength, isRead, read, toString, write
public Body(InputStream in) throws IOException
IOException
public Body(InputStream in, int length) throws IOException
IOException
public Body(byte[] content)
protected void readLocal() throws IOException
readLocal
in class AbstractBody
IOException
protected void writeAlreadyRead(AbstractBodyTransferrer out) throws IOException
writeAlreadyRead
in class AbstractBody
IOException
protected void writeNotRead(AbstractBodyTransferrer out) throws IOException
writeNotRead
in class AbstractBody
IOException
protected byte[] getRawLocal() throws IOException
getRawLocal
in class AbstractBody
IOException
Copyright © 2012. All Rights Reserved.