public class WarcResponse extends WarcCaptureRecord
| Modifier and Type | Class and Description |
|---|---|
static class |
WarcResponse.Builder |
WarcCaptureRecord.AbstractBuilder<R extends WarcCaptureRecord,B extends WarcCaptureRecord.AbstractBuilder<R,B>>WarcRecord.Constructor<R extends WarcRecord>| Modifier and Type | Method and Description |
|---|---|
GeminiResponse |
gemini() |
HttpResponse |
http()
Parses the HTTP response captured by this record.
|
Optional<WarcPayload> |
payload()
Returns the payload of this record if one is present.
|
MediaType |
payloadType()
Content-Type of the payload.
|
concurrentTo, ipAddressidentifiedPayloadType, payloadDigest, target, targetURI, toString, warcinfoIDblockDigest, calculatedBlockDigest, date, id, segmentNumber, truncated, typebody, contentType, headers, serializeHeader, versionpublic HttpResponse http() throws IOException
This is a convenience method for HttpResponse.parse(response.body().channel()).
IOExceptionpublic GeminiResponse gemini() throws IOException
IOExceptionpublic MediaType payloadType() throws IOException
WarcCaptureRecordpayloadType in class WarcCaptureRecordIOExceptionpublic Optional<WarcPayload> payload() throws IOException
WarcTargetRecordThis method returns an empty optional when the payload is undefined for this record type or if this library does not know how to parse the body in order to extract the payload. If the payload is well defined but happens to be zero bytes in length this method still returns a WarcPayload object.
payload in class WarcTargetRecordIOExceptionCopyright © 2024. All rights reserved.