synchronized void establishConnection ( ) throws IOException { if ( isConnected ) { throw new IOException ( "Pipe already connected" ) ; } if ( buffer == null ) { // We may already have allocated the buffer. buffer = new byte [ PipedInputStream . PIPE_SIZE ] ; } isConnected = true ; }
Establishes the connection to the PipedOutputStream .