Esempio n. 1
0
 public void readMetaInfo() throws BookReadingException {
   myReadState = READ_NOTHING;
   myAuthorNames[0] = "";
   myAuthorNames[1] = "";
   myAuthorNames[2] = "";
   myBuffer.delete(0, myBuffer.length());
   try {
     ZLXMLProcessor.read(this, myBook.File, 512);
   } catch (IOException e) {
     throw new BookReadingException(e, myBook.File);
   }
 }
Esempio n. 2
0
  String readAnnotation(ZLFile file) {
    myReadState = READ_NONE;
    myBuffer.delete(0, myBuffer.length());

    try {
      ZLXMLProcessor.read(this, file, 512);
      final int len = myBuffer.length();
      if (len > 1) {
        if (myBuffer.charAt(len - 1) == '\n') {
          myBuffer.delete(len - 1, len);
        }
        return myBuffer.toString();
      }
      return null;
    } catch (IOException e) {
      return null;
    }
  }