1 33 34 package edu.rice.cs.util; 35 36 import java.io.*; 37 38 44 public abstract class OutputStreamRedirector extends OutputStream { 45 public final void write(int b) { 46 write(new byte[] { (byte) b }, 0, 1); 47 } 48 49 public final void write(byte[] b) { 50 print(new String (b)); 51 } 52 53 public final void write(byte[] b, int off, int len) { 54 print(new String (b, off, len)); 55 } 56 57 60 public abstract void print(String s); 61 } 62 | Popular Tags |