Package org.apache.qpid.protonj2.codec
Interface EncoderState
- 
- All Known Implementing Classes:
- ProtonEncoderState
 
 public interface EncoderStateRetains Encoder state information either between calls or across encode iterations.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description ProtonBufferencodeUTF8(ProtonBuffer buffer, CharSequence sequence)Encodes the given sequence of characters in UTF8 to the given buffer.EncodergetEncoder()EncoderStatereset()Resets any intermediate state back to default values.
 
- 
- 
- 
Method Detail- 
getEncoderEncoder getEncoder() - Returns:
- the Encoder instance that create this state object.
 
 - 
resetEncoderState reset() Resets any intermediate state back to default values.- Returns:
- this EncoderStateinstance.
 
 - 
encodeUTF8ProtonBuffer encodeUTF8(ProtonBuffer buffer, CharSequence sequence) throws EncodeException Encodes the given sequence of characters in UTF8 to the given buffer.- Parameters:
- buffer- A ProtonBuffer where the UTF-8 encoded bytes should be written.
- sequence- A- CharSequencerepresenting the UTF-8 bytes to encode
- Returns:
- a reference to the encoding buffer for chaining
- Throws:
- EncodeException- if an error occurs while encoding the- CharSequence
 
 
- 
 
-