public void writeObjectId ( ObjectId objectId ) throws IOException { _writeArrayFieldNameIfNeeded ( ) ; _verifyValueWrite ( "write datetime" ) ; _buffer . putByte ( _typeMarker , BsonConstants . TYPE_OBJECTID ) ; // ObjectIds have their byte order flipped int time = ByteOrderUtil . flip ( objectId . getTime ( ) ) ; int machine = ByteOrderUtil . flip ( objectId . getMachine ( ) ) ; int inc = ByteOrderUtil . flip ( objectId . getInc ( ) ) ; _buffer . putInt ( time ) ; _buffer . putInt ( machine ) ; _buffer . putInt ( inc ) ; flushBuffer ( ) ; }
Write a BSON ObjectId