Package com.pnfsoftware.jeb.util.io
Class XorOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
com.pnfsoftware.jeb.util.io.XorOutputStream
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
Filter output stream that XORs every byte written with a fixed one-byte key.
-
Field Summary
Fields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterOutputStream
close, flush, write, writeMethods inherited from class java.io.OutputStream
nullOutputStream
-
Constructor Details
-
XorOutputStream
Create an XOR-encoding stream.- Parameters:
out- wrapped output streamkey- XOR key; only the low 8 bits are used
-
-
Method Details
-
write
- Overrides:
writein classFilterOutputStream- Throws:
IOException
-