public String readBinary ( char end ) throws IOException { int startOffset = bufferOffset ; int startLinePos = linePos ; CharArrayWriter baos = new CharArrayWriter ( ) ; while ( readNextChar ( ) ) { if ( lastChar == end ) { lastChar = 0 ; return baos . toString ( ) ; } else if ( lastChar == ' ' || lastChar == ' ' || lastChar == ' ' || lastChar == ' ' ) { throw failure ( getLineNo ( ) , startLinePos , startOffset , "Illegal char '%s' in binary" , Strings . escape ( ( char ) lastChar ) ) ; } baos . write ( lastChar ) ; } throw eof ( "Unexpected end of file in binary" ) ; }
Read the content of encoded binary . This does not parse the binary just read out from the buffer the string representing the binary data as delimited by the requested end char .