XorOutputStreampublic class XorOutputStream extends FilterOutputStream
Fields Summary |
---|
private byte | pattern |
Constructors Summary |
---|
public XorOutputStream(OutputStream out, byte pattern)
/*
* Constructor for class XorOutputStream
*/
super(out);
if (pattern != 0)
this.pattern = pattern;
|
Methods Summary |
---|
public void | write(int b)
out.write(b ^ pattern);
out.flush();
| public void | write(byte[] b, int off, int len)
for (int i = 0; i < len; i++)
write(b[off + i]);
|
|