question: private void readData ( ) throws IOException { while ( ! isClosed ) { int code = is . read ( ) ; switch ( code ) { case ' ' : case '\t' : case '\n' : case '\r' : break ; case 'C' : { int channel = ( is . read ( ) << 8 ) + is . read ( ) ; inputReady [ channel ] = true ; return ; } case 'E' : { int channel = ( is . read ( ) << 8 ) + is . read ( ) ; int status = ( is . read ( ) << 8 ) + is . read ( ) ; inputReady [ channel ] = true ; return ; } case - 1 : close ( ) ; return ; default : close ( ) ; return ; } } return ; }
target:  Reads data until a channel packet 'C' or error 'E' is received.