Esempio n. 1
0
 public int getStartxref() throws IOException {
   int size = Math.min(1024, file.length());
   int pos = file.length() - size;
   file.seek(pos);
   String str = readString(1024);
   int idx = str.lastIndexOf("startxref");
   if (idx < 0) throw new IOException("PDF startxref not found.");
   return pos + idx;
 }
Esempio n. 2
0
 public int length() throws IOException {
   return file.length();
 }