Class GeminiResponse
java.lang.Object
org.netpreserve.jwarc.Message
org.netpreserve.jwarc.GeminiResponse
-
Nested Class Summary
Nested classes/interfaces inherited from class org.netpreserve.jwarc.Message
Message.AbstractBuilder<R extends Message,B extends Message.AbstractBuilder<R, B>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe media type of the body.meta()static GeminiResponseparse(ReadableByteChannel channel, ByteBuffer buffer) byte[]Serializes the message header.intstatus()intReturns the HTTP equivalent of the status code.
-
Constructor Details
-
GeminiResponse
-
-
Method Details
-
parse
public static GeminiResponse parse(ReadableByteChannel channel, ByteBuffer buffer) throws IOException - Throws:
IOException
-
status
public int status() -
statusHttpEquivalent
public int statusHttpEquivalent()Returns the HTTP equivalent of the status code. (e.g. 20 -> 200, 51 -> 404) -
meta
-
serializeHeader
public byte[] serializeHeader()Description copied from class:MessageSerializes the message header.- Overrides:
serializeHeaderin classMessage
-
contentType
Description copied from class:MessageThe media type of the body.Returns "application/octet-stream" if the Content-Type header is missing.
- Overrides:
contentTypein classMessage
-