code: @Override
      public String doOCR(BufferedImage bi, Rectangle rect) throws TesseractException {
          try {
              return doOCR(ImageIOHelper.getIIOImageList(bi), rect);
          } catch (Exception e) {
              logger.error(e.getMessage(), e);
              throw new TesseractException(e);
          }
      }
docs: Performs OCR operation.
  
  @param bi a buffered image
  @param rect the bounding rectangle defines the region of the image to be
  recognized. A rectangle of zero dimension or <code>null</code> indicates
  the whole image.
  @return the recognized text
  @throws TesseractException