Class Message
java.lang.Object
org.netpreserve.jwarc.Message
- Direct Known Subclasses:
GeminiResponse,HttpMessage,WarcRecord
A message consisting of headers and a content block (body). Forms the basis of protocols and formats like HTTP and
WARC.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMessage.AbstractBuilder<R extends Message,B extends Message.AbstractBuilder<R, B>> -
Method Summary
-
Method Details
-
headers
The named header fields of this message. -
body
The content body of this message. -
version
The version of the network protocol or file format containing this message. -
contentType
The media type of the body.Returns "application/octet-stream" if the Content-Type header is missing.
-
serializeHeader
public byte[] serializeHeader()Serializes the message header.
-