edu.vt.middleware.crypt.io
Class HexFilterInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FilterInputStream
          extended by edu.vt.middleware.crypt.io.AbstractEncodingFilterInputStream
              extended by edu.vt.middleware.crypt.io.HexFilterInputStream
All Implemented Interfaces:
Closeable

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
HexFilterInputStream(InputStream in)
          Creates a hex filter input stream around the given input stream.
 
Method Summary
protected  void fillBuffer()
          Reads characters from the input reader and decodes them to fill AbstractEncodingFilterInputStream.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.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class AbstractEncodingFilterInputStream
Returns:
Encoder instance.

fillBuffer

protected void fillBuffer()
                   throws IOException
Reads characters from the input reader and decodes them to fill AbstractEncodingFilterInputStream.decodeBuffer.

Specified by:
fillBuffer in class AbstractEncodingFilterInputStream
Throws:
IOException - On read errors.


Copyright © 2003-2013 Virginia Tech. All Rights Reserved.