import java.io.*;
/**
* Created by IntelliJ IDEA.
* User: me
* Date: 13.09.2006
* Time: 17:16:39
* To change this template use File | Settings | File Templates.
*/
public class EncryptStreamTest {
EncryptOutputStream enc = new EncryptOutputStream(fout);
byte[] data = new byte[] {1,2,3,4,5,6,7,8,9,10};
enc.write(data);
enc.close();
fout.close();
DecryptInputStream decrypt = new DecryptInputStream(fin);
int c;
while ((c = decrypt.read()) != -1) {
}
// // Attempt to read using alternative method
// int num = decrypt.read(data);
// System.out.println("num = " + num + ", result: " + (new String(data)));
fin.close();
decrypt.close();
}
}