Code example for PipedReader

0
 
        public char[] buf;
 
        public PReader(PipedWriter pw) {
            try { 
                pr = new PipedReader(pw);
            } catch (IOException e) {
                System.out.println("Exception setting up reader: "
                        + e.toString());
            } 
        } 
 
        public PReader(PipedReader pr) {
            this.pr = pr;
        } 
 
/*        public void run() { 
            try { 
                int r = 0; 
                for (int i = 0; i < buf.length; i++) { 
                    r = pr.read();