Code example for PipedInputStream

Methods: available

0
            } 
        } 
 
        public int available() { 
            try { 
                return reader.available();
            } catch (Exception e) {
                return -1; 
            } 
        } 
 
        public void run() { 
            try { 
                while (true) { 
                    Thread.sleep(1000);
                    Thread.yield();
                } 
            } catch (InterruptedException e) {
            } 
        }