Code example for CharsetDecoder

Methods: decodeflush

0
		this.listener = listener;
	} 
 
	public boolean parseContents(ByteBuffer buffer) {
		int remaining = buffer.remaining();
		this.decoder.decode(buffer, this.charBuffer, (this.octetsLeft == remaining));
		this.octetsLeft = this.octetsLeft - remaining;
		if (this.octetsLeft > 0) {
			return false; 
		} 
 
		this.decoder.flush(this.charBuffer);
		this.charBuffer.rewind();
		this.theString = this.charBuffer.toString();
		return true; 
 
	} 
 
	protected void checkContentsLength(int tlvLength) {
		if (tlvLength < 0) {
Experience pair programming with AI  Get Codota for Java