public String readError ( ) throws IOException { state = State . ERROR ; // Read the error body databuffer byte [ ] bytes = new byte [ this . chunksize ] ; try { if ( read ( bytes , 0 , this . chunksize ) < this . chunksize ) throw new ErrorException ( "Short chunk" ) ; } catch ( IOException ioe ) { throw new ErrorException ( ioe ) ; } String document = new String ( bytes , DapUtil . UTF8 ) ; return document ; }
Read an error chunk