FileDocCategorySizeDatePackage
XorOutputStream.javaAPI DocExample2421Wed Apr 19 11:20:16 BST 2000examples.rmisocfac

XorOutputStream

public 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 voidwrite(int b)

       out.write(b ^ pattern);
       out.flush();
    
public voidwrite(byte[] b, int off, int len)

        for (int i = 0; i < len; i++)
            write(b[off + i]);