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