code: private void validateQuietZone(BitArray row, int startPattern) throws NotFoundException {
  
      int quietCount = this.narrowLineWidth * 10;  // expect to find this many pixels of quiet zone
  
      // if there are not so many pixel at all let's try as many as possible
      quietCount = quietCount < startPattern ? quietCount : startPattern;
  
      for (int i = startPattern - 1; quietCount > 0 && i >= 0; i--) {
        if (row.get(i)) {
          break;
        }
        quietCount--;
      }
      if (quietCount != 0) {
        // Unable to find the necessary number of quiet zone pixels.
        throw NotFoundException.getNotFoundInstance();
      }
    }
docs: The start & end patterns must be pre/post fixed by a quiet zone. This
  zone must be at least 10 times the width of a narrow line.  Scan back until
  we either get to the start of the barcode or match the necessary number of
  quiet zone pixels.
  
  Note: Its assumed the row is reversed when using this method to find
  quiet zone after the end pattern.
  
  ref: http://www.barcode-1.net/i25code.html
  
  @param row bit array representing the scanned barcode.
  @param startPattern index into row of the start or end pattern.
  @throws NotFoundException if the quiet zone cannot be found