Package org.apache.thrift.transport.sasl
Class DataFrameWriter
java.lang.Object
org.apache.thrift.transport.sasl.FrameWriter
org.apache.thrift.transport.sasl.DataFrameWriter
Write frames of thrift messages. It expects an empty/null header to be provided with a payload to
be written out. Non empty headers are considered as error.
-
Field Summary
Fields inherited from class org.apache.thrift.transport.sasl.FrameWriter
frameBytes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ByteBuffer
buildFrame
(byte[] header, int headerOffset, int headerLength, byte[] payload, int payloadOffset, int payloadLength) void
withOnlyPayload
(byte[] payload, int offset, int length) Provide only payload to the frame.Methods inherited from class org.apache.thrift.transport.sasl.FrameWriter
clear, isComplete, withHeaderAndPayload, withHeaderAndPayload, withOnlyPayload, write
-
Constructor Details
-
DataFrameWriter
public DataFrameWriter()
-
-
Method Details
-
withOnlyPayload
public void withOnlyPayload(byte[] payload, int offset, int length) Description copied from class:FrameWriter
Provide only payload to the frame. Throws UnsupportedOperationException if the frame expects a header.- Specified by:
withOnlyPayload
in classFrameWriter
- Parameters:
payload
- The underlying byte array as a recipient of the payloadoffset
- The offset in the byte array starting from where the payload is locatedlength
- The length of the payload
-
buildFrame
protected ByteBuffer buildFrame(byte[] header, int headerOffset, int headerLength, byte[] payload, int payloadOffset, int payloadLength) - Specified by:
buildFrame
in classFrameWriter
-