private void writeEventTypes(int[] types,BinaryRawWriterEx writer){
  if (types == null) {
    writer.writeIntArray(null);
    return;
  }
  int[] resultTypes=new int[types.length];
  int idx=0;
  for (  int t : types)   if (platformCtx.isEventTypeSupported(t))   resultTypes[idx++]=t;
  writer.writeIntArray(Arrays.copyOf(resultTypes,idx));
}

private void writeEventTypes ( int [ ] types , BinaryRawWriterEx writer ) { if ( types == null ) { writer . writeIntArray ( null ) ; return ; } int [ ] resultTypes = new int [ types . length ] ; int idx = 0 ; for ( int t : types ) if ( platformCtx . isEventTypeSupported ( t ) ) resultTypes [ idx ++ ] = t ; writer . writeIntArray ( Arrays . copyOf ( resultTypes , idx ) ) ; }
reads event types array .
