public void writeBinary(final PacketOutputStream writeBuffer){
  calendar=Calendar.getInstance();
  calendar.setTimeInMillis(date.getTime());
  writeBuffer.writeDateLength(calendar);
}

public void writeBinary ( final PacketOutputStream writeBuffer ) { calendar = Calendar . getInstance ( ) ; calendar . setTimeInMillis ( date . getTime ( ) ) ; writeBuffer . writeDateLength ( calendar ) ; }
write to server outputstream in binary protocol .
