java.lang.Object
io.jooby.rocker.ByteBufferOutput
- All Implemented Interfaces:
com.fizzed.rocker.RockerOutput<ByteBufferOutput>
public class ByteBufferOutput
extends Object
implements com.fizzed.rocker.RockerOutput<ByteBufferOutput>
Rocker output that uses a byte array to render the output.
- Author:
- edgar
-
Field Details
-
BUFFER_SIZE
public static final int BUFFER_SIZEDefault buffer size:4k
.- See Also:
-
-
Method Details
-
getContentType
public com.fizzed.rocker.ContentType getContentType()- Specified by:
getContentType
in interfacecom.fizzed.rocker.RockerOutput<ByteBufferOutput>
-
getCharset
- Specified by:
getCharset
in interfacecom.fizzed.rocker.RockerOutput<ByteBufferOutput>
-
w
- Specified by:
w
in interfacecom.fizzed.rocker.RockerOutput<ByteBufferOutput>
-
w
- Specified by:
w
in interfacecom.fizzed.rocker.RockerOutput<ByteBufferOutput>
-
getByteLength
public int getByteLength()- Specified by:
getByteLength
in interfacecom.fizzed.rocker.RockerOutput<ByteBufferOutput>
-
toBuffer
Get a view of the byte buffer.- Returns:
- Byte buffer.
-
toByteArray
public byte[] toByteArray()Copy internal byte array into a new array.- Returns:
- Byte array.
-