code: @Override
      public int compareTo (CharsetMatch other) {
          int compareResult = 0;
          if (this.fConfidence > other.fConfidence) {
              compareResult = 1;
          } else if (this.fConfidence < other.fConfidence) {
              compareResult = -1;
          }
          return compareResult;
      }
docs: Compare to other CharsetMatch objects.
  Comparison is based on the match confidence value, which
  allows CharsetDetector.detectAll() to order its results.
  
  @param other the CharsetMatch object to compare against.
  @return  a negative integer, zero, or a positive integer as the
  confidence level of this CharsetMatch
  is less than, equal to, or greater than that of
  the argument.
  @throws ClassCastException if the argument is not a CharsetMatch.