public class CompositeResource extends Resource
Resource made up from pair of header resource
and payload resource.
This class is typically used for binding revisit record and
revisited (original) resource together, making it look like
one complete capture.| Constructor and Description |
|---|
CompositeResource(Resource headersResource,
Resource payloadResource)
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
String |
getHeader(String headerName) |
Map<String,String> |
getHttpHeaders()
Assumes an HTTP response - return the HTTP headers, not including the
HTTP Message header
|
long |
getRecordLength() |
int |
getStatusCode()
Assumes an HTTP resource - return the HTTP response code
|
void |
mark(int readlimit) |
boolean |
markSupported() |
void |
parseHeaders() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
void |
setChunkedEncoding()
indicate that there is a
Transfer-Encoding: chunked header, so the input
data should be dechunked as it is read. |
long |
skip(long n) |
getRefersToDate, getRefersToTargetURI, setInputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ResourceIOExceptionpublic int getStatusCode()
ResourcegetStatusCode in class Resourcepublic long getRecordLength()
getRecordLength in class Resourcepublic Map<String,String> getHttpHeaders()
ResourcegetHttpHeaders in class Resourcepublic void parseHeaders()
throws IOException
parseHeaders in class ResourceIOExceptionpublic void setChunkedEncoding()
throws IOException
ResourceTransfer-Encoding: chunked header, so the input
data should be dechunked as it is read. This method actually peeks
ahead to verify that there is a hex-encoded chunk length before
assuming the data is chunked.setChunkedEncoding in class ResourceIOException - for usual reasonspublic int available()
throws IOException
available in class ResourceIOExceptionpublic boolean markSupported()
markSupported in class Resourcepublic int read()
throws IOException
read in class ResourceIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class ResourceIOExceptionpublic int read(byte[] b)
throws IOException
read in class ResourceIOExceptionpublic void reset()
throws IOException
reset in class ResourceIOExceptionpublic long skip(long n)
throws IOException
skip in class ResourceIOExceptionCopyright © 2005–2017 IIPC. All rights reserved.