public static void writeByteCollection(DataOutput out,Collection<Byte> col) throws IOException {
  if (col != null) {
    out.writeInt(col.size());
    for (    Byte i : col)     out.writeByte(i);
  }
 else   out.writeInt(-1);
}

public static void writeByteCollection ( DataOutput out , Collection < Byte > col ) throws IOException { if ( col != null ) { out . writeInt ( col . size ( ) ) ; for ( Byte i : col ) out . writeByte ( i ) ; } else out . writeInt ( - 1 ) ; }
/ / fixme : added for dr datacenterids , review if it is needed after gg - 6879 .
