public static void writeInt(DataOutputStream dis,boolean isBigEndian,int val) throws IOException {
  if (!isBigEndian) {
    writeLittleEndianInt(dis,val);
  }
 else {
    dis.writeInt(val);
  }
}

public static void writeInt ( DataOutputStream dis , boolean isBigEndian , int val ) throws IOException { if ( ! isBigEndian ) { writeLittleEndianInt ( dis , val ) ; } else { dis . writeInt ( val ) ; } }
writes an integer to the output stream , byte - swapping as necessary
