Class MarshaledResponseBody.Bytes
java.lang.Object
com.soklet.MarshaledResponseBody.Bytes
- All Implemented Interfaces:
MarshaledResponseBody
- Enclosing interface:
MarshaledResponseBody
public static final class MarshaledResponseBody.Bytes
extends Object
implements MarshaledResponseBody
A finalized response body backed by a byte array.
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from interface MarshaledResponseBody
MarshaledResponseBody.ByteBuffer, MarshaledResponseBody.Bytes, MarshaledResponseBody.File, MarshaledResponseBody.FileChannelModifier and TypeInterfaceDescriptionstatic final classA finalized response body backed by aByteBuffer.static final classA finalized response body backed by a byte array.static final classA finalized response body backed by a file path.static final classA finalized response body backed by aFileChannel. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Bytes
-
-
Method Details
-
getBytes
The byte array backing this body.For compatibility with prior
MarshaledResponsebehavior, this array is not defensively copied.- Returns:
- the bytes to write
-
getLength
Description copied from interface:MarshaledResponseBodyThe number of bytes this body will write.- Specified by:
getLengthin interfaceMarshaledResponseBody- Returns:
- the body length
-