Package org.apache.qpid.protonj2.codec
Interface StreamDecoderState
- 
- All Known Implementing Classes:
- ProtonStreamDecoderState
 
 public interface StreamDecoderStateRetains state of theInputStreambased decode either between calls or across decode iterations
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description StringdecodeUTF8(InputStream stream, int length)Given a stream that will provide UTF-8 encoded bytes, decode and return the String that represents that UTF-8 value.StreamDecodergetDecoder()StreamDecoderStatereset()Resets any intermediate state back to default values.
 
- 
- 
- 
Method Detail- 
resetStreamDecoderState reset() Resets any intermediate state back to default values.- Returns:
- this StreamDecoderStateinstance.
 
 - 
getDecoderStreamDecoder getDecoder() - Returns:
- the StreamDecoderthat created this state object
 
 - 
decodeUTF8String decodeUTF8(InputStream stream, int length) throws DecodeException Given a stream that will provide UTF-8 encoded bytes, decode and return the String that represents that UTF-8 value.- Parameters:
- stream- A stream from which the UTF-8 encoded bytes are to be decoded.
- length- The number of bytes in the passed- InputStreamthat comprise the UTF-8 encoding.
- Returns:
- a String that represents the UTF-8 decoded bytes.
- Throws:
- DecodeException- if an error occurs while decoding the string value.
 
 
- 
 
-