static SortOrder readSortOrder(ByteBuffer buffer,int position,JetFormat format){
  short value=buffer.getShort(position);
  byte version=0;
  if (format.SIZE_SORT_ORDER == 4) {
    version=buffer.get(position + 3);
  }
  if (value == 0) {
    return format.DEFAULT_SORT_ORDER;
  }
  if (value == GENERAL_SORT_ORDER_VALUE) {
    if (version == GENERAL_LEGACY_SORT_ORDER.getVersion()) {
      return GENERAL_LEGACY_SORT_ORDER;
    }
    if (version == GENERAL_SORT_ORDER.getVersion()) {
      return GENERAL_SORT_ORDER;
    }
  }
  return new SortOrder(value,version);
}

static SortOrder readSortOrder ( ByteBuffer buffer , int position , JetFormat format ) { short value = buffer . getShort ( position ) ; byte version = 0 ; if ( format . SIZE_SORT_ORDER == 4 ) { version = buffer . get ( position + 3 ) ; } if ( value == 0 ) { return format . DEFAULT_SORT_ORDER ; } if ( value == GENERAL_SORT_ORDER_VALUE ) { if ( version == GENERAL_LEGACY_SORT_ORDER . getVersion ( ) ) { return GENERAL_LEGACY_SORT_ORDER ; } if ( version == GENERAL_SORT_ORDER . getVersion ( ) ) { return GENERAL_SORT_ORDER ; } } return new SortOrder ( value , version ) ; }
reads the sort order info from the given buffer from the given position .
