/** * Wraps the input stream to emulate a slow device * @param in input stream * @param cps characters per second to emulate */ public SlowInputStream(InputStream in, int cps) { super(in); pauser = new CPSPauser(cps); }
/** * Create wrapped Output Stream toe emulate the requested CPS. * @param out OutputStream * @param cps characters per second */ public SlowOutputStream(OutputStream out, int cps) { super(out); pauser = new CPSPauser(cps); }