How do I save a document in a different database?

I think this is a simple question. Saving document by a Java agent is quite simple, just doc.save() and that would save the document in the same database. But how about save a document in a different database??? How do I do that? Thanks

Subject: copyToDatabase

public Document copyToDatabase(Database db) throws NotesException

Subject: Saving document

The document is saved in whichever database you initially created it in.

So when calling the CreateDocument method in Java use a database handle for the database you want to save the document in.