public void writeDateTime ( Date date ) throws IOException { _writeArrayFieldNameIfNeeded ( ) ; _verifyValueWrite ( "write datetime" ) ; _buffer . putByte ( _typeMarker , BsonConstants . TYPE_DATETIME ) ; _buffer . putLong ( date . getTime ( ) ) ; flushBuffer ( ) ; }
Write a BSON date time