org.eclipse.actf.util.httpproxy.core
Interface IHTTPResponsePushbackMessage
- All Superinterfaces:
- IHTTPMessage, IHTTPResponseMessage
public interface IHTTPResponsePushbackMessage
- extends IHTTPResponseMessage
A HTTP response message which can provide IPushbackMessageBody
.
Methods inherited from interface org.eclipse.actf.util.httpproxy.core.IHTTPMessage |
addTrailingHeader, getHeader, getHeaderAsBytes, getHeaders, getHTTPVersionAsBytes, getHTTPVersionAsString, getMessageBody, getSerial, getTid, isChunkedEncoding, isConnectionToBeClosed, isHTTPVersion1_1, removeHeader, setChunkedEncoding, setConnectionHeader, setHeader, setTid, write, writeBody |
readBody
byte[] readBody(long timeout,
boolean pushback)
throws IOException,
TimeoutException
- Reads the body of this message and returns it as an array of bytes.
Note that the message body cannot be read later if false is specified for 'pushback' parameter or if
an exception is thrown.
- Parameters:
timeout
- number of milliseconds until when the message body is read, or 0 if it does not need to timeoutpushback
- true if the read bytes need to be pushed back to the input stream
- Returns:
- body of this message as an array of bytes
- Throws:
IOException
TimeoutException
getPushbackMessageBody
IPushbackMessageBody getPushbackMessageBody()
- Returns a message body that can provide
PushbackInputStream
for reading the body.
- Returns:
- a message body that can provide
PushbackInputStream
for reading the body.