- 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
public class HexFilterInputStream extends AbstractEncodingFilterInputStream
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
Constructors Constructor Description HexFilterInputStream(InputStream in)
Creates a hex filter input stream around the given input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
fillBuffer()
Reads characters from the input reader and decodes them to fillAbstractEncodingFilterInputStream.decodeBuffer
.protected int
getDecodeBufferCapacity()
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, transferTo
-
-
-
-
Constructor Detail
-
HexFilterInputStream
public HexFilterInputStream(InputStream in)
Creates a hex filter input stream around the given input stream.- Parameters:
in
- Input stream to wrap.
-
-
Method Detail
-
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
protected void fillBuffer() throws IOException
Reads characters from the input reader and decodes them to fillAbstractEncodingFilterInputStream.decodeBuffer
.- Specified by:
fillBuffer
in classAbstractEncodingFilterInputStream
- Throws:
IOException
- On read errors.
-
-