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, writepublic Body(InputStream in) throws IOException
IOExceptionpublic Body(InputStream in, int length) throws IOException
IOExceptionpublic Body(byte[] content)
protected void readLocal()
throws IOException
readLocal in class AbstractBodyIOExceptionprotected void writeAlreadyRead(AbstractBodyTransferrer out) throws IOException
writeAlreadyRead in class AbstractBodyIOExceptionprotected void writeNotRead(AbstractBodyTransferrer out) throws IOException
writeNotRead in class AbstractBodyIOExceptionprotected byte[] getRawLocal()
throws IOException
getRawLocal in class AbstractBodyIOExceptionCopyright © 2012. All Rights Reserved.