format/src/main/java/com/github/sadikovi/riff/stats/Statistics.java
/**
   * Get magic byte for statistics.
   * @param stats statistics instance
   * @return byte to use for serialization
   */
Get magic byte for statistics.
@param stats statistics instance
@return byte to use for serialization
Get magic byte for statistics . @param stats statistics instance @return byte to use for serialization
public static byte statisticsToMagic(Statistics stats) {
    if (stats instanceof IntStatistics) return 1;
    if (stats instanceof LongStatistics) return 2;
    if (stats instanceof UTF8Statistics) return 3;
    if (stats instanceof DateStatistics) return 4;
    if (stats instanceof TimestampStatistics) return 5;
    if (stats instanceof BooleanStatistics) return 6;
    if (stats instanceof ShortStatistics) return 7;
    if (stats instanceof ByteStatistics) return 8;
    throw new UnsupportedOperationException("Unrecognized statistics: " + stats);
  }
public static byte statisticsToMagic ( Statistics stats ) { if ( stats instanceof IntStatistics ) return 1 ; if ( stats instanceof LongStatistics ) return 2 ; if ( stats instanceof UTF8Statistics ) return 3 ; if ( stats instanceof DateStatistics ) return 4 ; if ( stats instanceof TimestampStatistics ) return 5 ; if ( stats instanceof BooleanStatistics ) return 6 ; if ( stats instanceof ShortStatistics ) return 7 ; if ( stats instanceof ByteStatistics ) return 8 ; throw new UnsupportedOperationException ( "Unrecognized statistics: " + stats ) ; }
Get magic byte for statistics.
Get magic byte for statistics .