Class PadInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--PadInputStream

public class PadInputStream
extends java.io.InputStream

PadInputStream.java Stream that gets data from specified inputStream (first argument to constructor) and decrypts (or encrypts) it with the keyfile (second arguemnt to constructor)

Version:
1.0 LAST EDITED: 31.01.2001 <-little endian,
Author:
Erlend Aakre, www.klogd.net

Constructor Summary
PadInputStream(java.io.InputStream inputStream, java.io.RandomAccessFile keyFile)
          Sets the keyfile and InputStream
 
Method Summary
 void close()
          This closes the streams
 int read()
          This decrypts/encrypts the data from the inputstream with the data from the keyfile and returns the result
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PadInputStream

public PadInputStream(java.io.InputStream inputStream,
                      java.io.RandomAccessFile keyFile)
Sets the keyfile and InputStream
Parameters:
inputStream - any inputstream to read data from
keyFile - a file to use as key
Method Detail

read

public int read()
         throws java.io.IOException
This decrypts/encrypts the data from the inputstream with the data from the keyfile and returns the result
Overrides:
read in class java.io.InputStream
Returns:
the decrypted/encrypted data
Throws:
java.io.IOException -  

close

public void close()
           throws java.io.IOException
This closes the streams
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException -