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`.

### Field Summary

### Fields inherited from interface org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage

`EMPTY_BODY`

### Fields inherited from interface org.eclipse.actf.util.httpproxy.core.IHTTPMessage

`CR, DEFAULT_INITIAL_BUFFER_SIZE, HT, INIT_NUM_HEADERS, LF, SP`

### Method Summary

Methods
`IPushbackMessageBody` `getPushbackMessageBody()` Returns a message body that can provide `PushbackInputStream` for reading the body.
`byte[]` `readBody(long timeout, boolean pushback)` Reads the body of this message and returns it as an array of bytes.

### Methods inherited from interface org.eclipse.actf.util.httpproxy.core.IHTTPResponseMessage

`getReasonPhraseAsBytes, getReasonPhraseAsString, getStatusCodeAsBytes, getStatusCodeAsString`

### 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`

### Method Detail

#### 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 timeout
  `pushback` - 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.