示例#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;
 }
示例#2
0
 public int length() throws IOException {
   return file.length();
 }