Convenience method that encodes the remaining content of a single input character buffer into a newly-allocated byte buffer.
This method implements an entire encoding operation; that is, it resets this encoder, then it encodes the characters in the given character buffer, and finally it flushes this encoder. This method should therefore not be invoked if an encoding operation is already in progress.
in
| The input character buffer |
IllegalStateException
| If an encoding operation is already in progress | |
MalformedInputException
| If the character sequence starting at the input buffer's current
position is not a legal sixteen-bit Unicode sequence and the current malformed-input action
is CodingErrorAction.REPORT | |
UnmappableCharacterException
| If the character sequence starting at the input buffer's current
position cannot be mapped to an equivalent byte sequence and
the current unmappable-character action is CodingErrorAction.REPORT |
Diagram: Charset