FileDocCategorySizeDatePackage
PrintableOutputStream.javaAPI DocExample667Sun Mar 28 19:06:20 BST 1999com.macfaq.io

PrintableOutputStream

public class PrintableOutputStream extends FilterOutputStream

Fields Summary
Constructors Summary
public PrintableOutputStream(OutputStream out)

    super(out);
  
Methods Summary
public voidwrite(int b)

  
    // carriage return, linefeed, and tab 
    if (b == 10 || b == 13 || b == 9) out.write(b);
    // non-printing characters
    else if (b < 32 || b > 126) out.write('?");
    // printing, ASCII characters
    else out.write(b);  
  
public voidwrite(byte[] data, int offset, int length)

    for (int i = offset; i < offset+length; i++) {
      this.write(data[i]);
    }