java.lang.Object
java.io.InputStream
java.io.FilterInputStream
edu.vt.middleware.crypt.io.AbstractEncodingFilterInputStream
edu.vt.middleware.crypt.io.HexFilterInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Decodes hexadecimal character bytes in the wrapped input stream into raw
bytes.
- Version:
- $Revision: 2745 $
- Author:
- Middleware Services
-
Field Summary
Fields inherited from class edu.vt.middleware.crypt.io.AbstractEncodingFilterInputStream
byteBuffer, CHUNK_SIZE, decodeBuffer, position
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
ConstructorDescriptionCreates a hex filter input stream around the given input stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Reads characters from the input reader and decodes them to fillAbstractEncodingFilterInputStream.decodeBuffer
.protected int
Gets the encoder that decodes encoded character data in the input stream to raw bytes.Methods inherited from class edu.vt.middleware.crypt.io.AbstractEncodingFilterInputStream
read, read, read
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
HexFilterInputStream
Creates a hex filter input stream around the given input stream.- Parameters:
in
- Input stream to wrap.
-
-
Method Details
-
getDecodeBufferCapacity
protected int getDecodeBufferCapacity()Gets the encoder that decodes encoded character data in the input stream to raw bytes.- Specified by:
getDecodeBufferCapacity
in classAbstractEncodingFilterInputStream
- Returns:
- Encoder instance.
-
fillBuffer
Reads characters from the input reader and decodes them to fillAbstractEncodingFilterInputStream.decodeBuffer
.- Specified by:
fillBuffer
in classAbstractEncodingFilterInputStream
- Throws:
IOException
- On read errors.
-