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, setInputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Resource
IOException
public int getStatusCode()
Resource
getStatusCode
in class Resource
public long getRecordLength()
getRecordLength
in class Resource
public Map<String,String> getHttpHeaders()
Resource
getHttpHeaders
in class Resource
public void parseHeaders() throws IOException
parseHeaders
in class Resource
IOException
public void setChunkedEncoding() throws IOException
Resource
Transfer-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 Resource
IOException
- for usual reasonspublic int available() throws IOException
available
in class Resource
IOException
public boolean markSupported()
markSupported
in class Resource
public int read() throws IOException
read
in class Resource
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class Resource
IOException
public int read(byte[] b) throws IOException
read
in class Resource
IOException
public void reset() throws IOException
reset
in class Resource
IOException
public long skip(long n) throws IOException
skip
in class Resource
IOException
Copyright © 2005–2015 IIPC. All rights reserved.