public PacketOutputStream writeDateLength(final Calendar calendar){
  assureBufferCapacity(8);
  buffer.put((byte)7);
  buffer.putShort((short)calendar.get(Calendar.YEAR));
  buffer.put((byte)((calendar.get(Calendar.MONTH) + 1) & 0xff));
  buffer.put((byte)(calendar.get(Calendar.DAY_OF_MONTH) & 0xff));
  buffer.put((byte)0);
  buffer.put((byte)0);
  buffer.put((byte)0);
  return this;
}

public PacketOutputStream writeDateLength ( final Calendar calendar ) { assureBufferCapacity ( 8 ) ; buffer . put ( ( byte ) 7 ) ; buffer . putShort ( ( short ) calendar . get ( Calendar . YEAR ) ) ; buffer . put ( ( byte ) ( ( calendar . get ( Calendar . MONTH ) + 1 ) & 0xff ) ) ; buffer . put ( ( byte ) ( calendar . get ( Calendar . DAY_OF_MONTH ) & 0xff ) ) ; buffer . put ( ( byte ) 0 ) ; buffer . put ( ( byte ) 0 ) ; buffer . put ( ( byte ) 0 ) ; return this ; }
write date in binary format .
