code: public final boolean getRange(int rangeIndex, int[] range) {
          if( rangeIndex<0) {
              return false;
          }
          if(array==null){
              array = new char[8];
          }
          if(range==null || range.length <2){
              throw new IllegalArgumentException();
          }
          rangeIndex*=2; /* address start/limit pairs */
          if(rangeIndex<bmpLength) {
              range[0]=array[rangeIndex++];
              if(rangeIndex<bmpLength) {
                  range[1]=array[rangeIndex]-1;
              } else if(rangeIndex<length) {
                  range[1]=((((int)array[rangeIndex])<<16)|array[rangeIndex+1])-1;
              } else {
                  range[1]=0x10ffff;
              }
              return true;
          } else {
              rangeIndex-=bmpLength;
              rangeIndex*=2; /* address pairs of pairs of units */
              int suppLength=length-bmpLength;
              if(rangeIndex<suppLength) {
                  int offset=arrayOffset+bmpLength;
                  range[0]=(((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1];
                  rangeIndex+=2;
                  if(rangeIndex<suppLength) {
                      range[1]=((((int)array[offset+rangeIndex])<<16)|array[offset+rangeIndex+1])-1;
                  } else {
                      range[1]=0x10ffff;
                  }
                  return true;
              } else {
                  return false;
              }
          }
      }
docs: Returns a range of characters contained in the given serialized
  set.
  @param rangeIndex a non-negative integer in the range <code>0..
  getSerializedRangeCount()-1</code>
  @param range variable to receive the data in the range
  @return true if rangeIndex is valid, otherwise false