Package org.cryptacular.codec
Class HexCodec
java.lang.Object
org.cryptacular.codec.HexCodec
- All Implemented Interfaces:
Codec
Hexadecimal encoder/decoder pair.
- Author:
- Middleware Services
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
HexCodec
public HexCodec()Creates a new instance that outputs lowercase hex characters and supports decoding in either case. -
HexCodec
public HexCodec(boolean uppercaseOutput) Creates a new instance that optionally outputs uppercase hex characters and supports decoding in either case.- Parameters:
uppercaseOutput
- True to output uppercase alphabetic characters, false for lowercase.
-
-
Method Details
-
getEncoder
- Specified by:
getEncoder
in interfaceCodec
- Returns:
- The byte-to-char encoder of the codec pair.
-
getDecoder
- Specified by:
getDecoder
in interfaceCodec
- Returns:
- The char-to-byte decoder of the codec pair.
-
newEncoder
- Specified by:
newEncoder
in interfaceCodec
- Returns:
- A new instance of the byte-to-char encoder of the codec pair.
-
newDecoder
- Specified by:
newDecoder
in interfaceCodec
- Returns:
- A new instance of the char-to-byte decoder of the codec pair.
-