Ejemplo n.º 1
0
 private void checkIndex(int imageIndex) {
   int noOfPages = decoder.getNumberOfPages();
   if (imageIndex < 0 || imageIndex > noOfPages) throw new IndexOutOfBoundsException("Bad index!");
 }
Ejemplo n.º 2
0
  public int getNumImages(boolean allowSearch) throws IOException {
    readFile();

    return decoder.getNumberOfPages();
  }