Monique,
The method storeFileDocumentContent needs the following parameters; IContext context, IMendixObject fileDocument, String fileName, InputStream inputStream So to store your created file you'll need to create or use a context, create a new filedocument (or pass it as an input parameter to your java action), set a filename and create an inputstream pointing to your created image. Then you can set the content for the filedocument.
Here's a quick method that takes a FileDocument entity and an open Java File object and stores that file into the entity:
private void setFileInFileDocument(File f, IMendixObject fileDocument)
{
try {
FileInputStream storeStream = new FileInputStream(f);
Core.storeFileDocumentContent(this.getContext(), fileDocument, f.getName(), storeStream);
}
catch (Exception e) {System.out.println(e);}
}