public interface RoResponse
Modifier and Type | Method and Description |
---|---|
byte[] |
getData()
Reads all the response data into a byte array.
|
java.lang.String |
getHeader(java.lang.String hdr)
retrieves the field for a given header.
|
java.util.Date |
getHeaderAsDate(java.lang.String hdr)
retrieves the field for a given header.
|
int |
getHeaderAsInt(java.lang.String hdr)
retrieves the field for a given header.
|
java.io.InputStream |
getInputStream()
Gets an input stream from which the returned data can be read.
|
java.lang.String |
getReasonLine() |
int |
getStatusCode()
give the status code for this request.
|
java.lang.String |
getTrailer(java.lang.String trailer)
Retrieves the field for a given trailer.
|
java.util.Date |
getTrailerAsDate(java.lang.String trailer)
Retrieves the field for a given trailer.
|
int |
getTrailerAsInt(java.lang.String trailer)
Retrieves the field for a given tailer.
|
java.lang.String |
getVersion() |
int getStatusCode() throws java.io.IOException
java.io.IOException
- If any exception occurs on the socket.java.lang.String getReasonLine() throws java.io.IOException
java.io.IOException
- If any exception occurs on the socket.java.lang.String getVersion() throws java.io.IOException
java.io.IOException
- If any exception occurs on the socket.java.lang.String getHeader(java.lang.String hdr) throws java.io.IOException
hdr
- the header name.java.io.IOException
- If any exception occurs on the socket.int getHeaderAsInt(java.lang.String hdr) throws java.io.IOException, java.lang.NumberFormatException
hdr
- the header name.java.lang.NumberFormatException
- if the header's value is not a number
or if the header does not exist.java.io.IOException
- if any exception occurs on the socket.java.util.Date getHeaderAsDate(java.lang.String hdr) throws java.io.IOException, java.lang.IllegalArgumentException
hdr
- the header name.java.io.IOException
- If any exception occurs on the socket.java.lang.IllegalArgumentException
- If the header cannot be parsed
as a date or time.java.lang.String getTrailer(java.lang.String trailer) throws java.io.IOException
getData()
.trailer
- the trailer name.java.io.IOException
- If any exception occurs on the socket.int getTrailerAsInt(java.lang.String trailer) throws java.io.IOException, java.lang.NumberFormatException
trailer
- the tailer name.java.lang.NumberFormatException
- if the trailer's value is not a number
or if the trailer does not exist.java.io.IOException
- if any exception occurs on the socket.java.util.Date getTrailerAsDate(java.lang.String trailer) throws java.io.IOException, java.lang.IllegalArgumentException
trailer
- the trailer name.java.lang.IllegalArgumentException
- if the trailer's value is neither a
legal date nor a number.java.io.IOException
- if any exception occurs on the socket.java.lang.IllegalArgumentException
- If the header cannot be parsed
as a date or time.byte[] getData() throws java.io.IOException
java.io.IOException
- If any io exception occured while reading
the datagetInputStream()
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- If any exception occurs on the socket.getData()