private static void writeSortOrder(ByteBuffer buffer,SortOrder sortOrder,JetFormat format){
  if (sortOrder == null) {
    sortOrder=format.DEFAULT_SORT_ORDER;
  }
  buffer.putShort(sortOrder.getValue());
  if (format.SIZE_SORT_ORDER == 4) {
    buffer.put((byte)0x00);
    buffer.put(sortOrder.getVersion());
  }
}

private static void writeSortOrder ( ByteBuffer buffer , SortOrder sortOrder , JetFormat format ) { if ( sortOrder == null ) { sortOrder = format . DEFAULT_SORT_ORDER ; } buffer . putShort ( sortOrder . getValue ( ) ) ; if ( format . SIZE_SORT_ORDER == 4 ) { buffer . put ( ( byte ) 0x00 ) ; buffer . put ( sortOrder . getVersion ( ) ) ; } }
writes the sort order info to the given buffer at the current position .
