static void checkFlags(int flags){
  int allowedFlags=READ_ONLY_FLAG_MASK | EMPTY_FLAG_MASK | COMPACT_FLAG_MASK| ORDERED_FLAG_MASK;
  int flagsMask=~allowedFlags;
  if ((flags & flagsMask) > 0) {
    throw new SketchesArgumentException("Possible corruption: Invalid flags field: " + Integer.toBinaryString(flags));
  }
}

static void checkFlags ( int flags ) { int allowedFlags = READ_ONLY_FLAG_MASK | EMPTY_FLAG_MASK | COMPACT_FLAG_MASK | ORDERED_FLAG_MASK ; int flagsMask = ~ allowedFlags ; if ( ( flags & flagsMask ) > 0 ) { throw new SketchesArgumentException ( "Possible corruption: Invalid flags field: " + Integer . toBinaryString ( flags ) ) ; } }
checks just the flags field of the preamble
