private PDFObject readName() throws IOException {
  StringBuffer sb=new StringBuffer();
  int c;
  while (isRegularCharacter(c=buf.get())) {
    if (c < '!' && c > '~') {
      break;
    }
    if (c == '#' && (majorVersion != 1 && minorVersion != 1)) {
      int hex=readHexPair();
      if (hex >= 0) {
        c=hex;
      }
 else {
        throw new PDFParseException("Bad #hex in /Name");
      }
    }
    sb.append((char)c);
  }
  buf.position(buf.position() - 1);
  return new PDFObject(this,PDFObject.NAME,sb.toString());
}

private PDFObject readName ( ) throws IOException { StringBuffer sb = new StringBuffer ( ) ; int c ; while ( isRegularCharacter ( c = buf . get ( ) ) ) { if ( c < '!' && c > '~' ) { break ; } if ( c == '#' && ( majorVersion != 1 && minorVersion != 1 ) ) { int hex = readHexPair ( ) ; if ( hex >= 0 ) { c = hex ; } else { throw new PDFParseException ( "Bad #hex in /Name" ) ; } } sb . append ( ( char ) c ) ; } buf . position ( buf . position ( ) - 1 ) ; return new PDFObject ( this , PDFObject . NAME , sb . toString ( ) ) ; }
read a / name . the / has already been read .
