java.lang.Object
swim.http.HttpPayload<T>
swim.http.HttpBody<T>
- All Implemented Interfaces:
Debug
-
Method Summary
Modifier and TypeMethodDescriptionlong
static <T> HttpBody<T>
create
(ByteBuffer data) static <T> HttpBody<T>
create
(ByteBuffer data, MediaType mediaType) static <T> HttpBody<T>
static <T> HttpBody<T>
static <T> HttpBody<T>
static <T> HttpBody<T>
<T> Output<T>
Writes a developer readable, debug-formatted string representation of this object tooutput
.static <T> Decoder<HttpMessage<T>>
decodeHttp
(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength) static <T> HttpBody<T>
empty()
<T2> Encoder<?,
HttpMessage<T2>> encodeHttp
(OutputBuffer<?> output, HttpMessage<T2> message, HttpWriter http) boolean
static <T> HttpBody<T>
static <T> HttpBody<T>
static <T> HttpBody<T>
fromResource
(ClassLoader classLoader, String resource) static <T> HttpBody<T>
fromResource
(ClassLoader classLoader, String resource, MediaType mediaType) get()
int
hashCode()
headers()
static <T> Decoder<HttpMessage<T>>
httpDecoder
(HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength) <T2> Encoder<?,
HttpMessage<T2>> httpEncoder
(HttpMessage<T2> message, HttpWriter http) boolean
Encoder<?,
?> toString()
Methods inherited from class swim.http.HttpPayload
encodeHttp, httpEncoder
-
Method Details
-
isDefined
public boolean isDefined()- Specified by:
isDefined
in classHttpPayload<T>
-
get
- Specified by:
get
in classHttpPayload<T>
-
payloadEncoder
-
contentLength
public long contentLength() -
mediaType
- Specified by:
mediaType
in classHttpPayload<T>
-
transferCodings
- Specified by:
transferCodings
in classHttpPayload<T>
-
headers
- Specified by:
headers
in classHttpPayload<T>
-
httpEncoder
- Specified by:
httpEncoder
in classHttpPayload<T>
-
encodeHttp
public <T2> Encoder<?,HttpMessage<T2>> encodeHttp(OutputBuffer<?> output, HttpMessage<T2> message, HttpWriter http) - Specified by:
encodeHttp
in classHttpPayload<T>
-
equals
-
hashCode
public int hashCode() -
debug
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
. -
toString
-
empty
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
create
-
fromFile
- Throws:
IOException
-
fromFile
- Throws:
IOException
-
fromResource
public static <T> HttpBody<T> fromResource(ClassLoader classLoader, String resource, MediaType mediaType) throws IOException - Throws:
IOException
-
fromResource
public static <T> HttpBody<T> fromResource(ClassLoader classLoader, String resource) throws IOException - Throws:
IOException
-
httpDecoder
public static <T> Decoder<HttpMessage<T>> httpDecoder(HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength) -
decodeHttp
public static <T> Decoder<HttpMessage<T>> decodeHttp(InputBuffer input, HttpMessage<?> message, Decoder<T> payloadDecoder, long contentLength)
-