public void writeBinary(final PacketOutputStream writeBuffer){
  if (options.useLegacyDatetimeCode)   calendar=Calendar.getInstance();
  calendar.setTimeInMillis(ts.getTime());
  writeBuffer.writeTimestampLength(calendar,ts,fractionalSeconds);
}

public void writeBinary ( final PacketOutputStream writeBuffer ) { if ( options . useLegacyDatetimeCode ) calendar = Calendar . getInstance ( ) ; calendar . setTimeInMillis ( ts . getTime ( ) ) ; writeBuffer . writeTimestampLength ( calendar , ts , fractionalSeconds ) ; }
write timestamp in binary format .
