public class HexDecoder extends CharToByteDecoder<HexDecoder> implements ILenientCharsSupport
Decodes from "hexadecimal encoding", where each byte is represented by 2 characters (0-padded if necessary).
By default, will throw a MalformedInputException
if any non-significant
characters are encountered.
This can be customized by configuring non-significant characters to ignore by using
setLenientChars(LenientChars)
.
Modifier and Type | Field and Description |
---|---|
protected LenientChars |
lenientChars |
averageOutPerIn, maxOutPerIn, minInPerOut, state
Constructor and Description |
---|
HexDecoder() |
Modifier and Type | Method and Description |
---|---|
protected CoderResult |
codingLoop(CharBuffer in,
ByteBuffer out,
boolean endOfInput) |
protected void |
configImpl(HexDecoder base)
Hook for implementations to configure themselves from another instance.
|
LenientChars |
getLenientChars() |
protected int |
getPartialByte(CharBuffer in) |
protected void |
init()
Hook called once after the first coding operation is started.
|
HexDecoder |
setLenientChars(LenientChars lenientChars) |
allocate, decodeToBytes, put
checkConfigAllowed, checkNullArgument, clone, code, code, config, flush, getAverageOutPerIn, getMaxOutPerIn, getMinInPerOut, implFlush, reset, resetImpl, throwIllegalStateException
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone, code, code, config, flush, getAverageOutPerIn, getMaxOutPerIn, getMinInPerOut, reset
protected LenientChars lenientChars
protected void configImpl(HexDecoder base)
BaseCoder
Hook for implementations to configure themselves from another instance. The base implementation does nothing.
configImpl
in class BaseCoder<CharBuffer,ByteBuffer,HexDecoder>
base
- The instance to copy the configuration from.protected void init()
BaseCoder
Hook called once after the first coding operation is started. The base implementation does nothing.
init
in class BaseCoder<CharBuffer,ByteBuffer,HexDecoder>
public LenientChars getLenientChars()
getLenientChars
in interface ILenientCharsSupport
public HexDecoder setLenientChars(LenientChars lenientChars)
setLenientChars
in interface ILenientCharsSupport
protected CoderResult codingLoop(CharBuffer in, ByteBuffer out, boolean endOfInput)
codingLoop
in class BaseCoder<CharBuffer,ByteBuffer,HexDecoder>
protected int getPartialByte(CharBuffer in)
Copyright © 2009–2017 Mark A. Ziesemer. All rights reserved.