Write it with an empty stream as source.
Java action with filedocument as parameter type System.FileDocument
import java.io.ByteArrayInputStream;
import com.mendix.core.Core;
import com.mendix.systemwideinterfaces.core.UserAction;
import com.mendix.systemwideinterfaces.core.IMendixObject;
// BEGIN USER CODE
Core.storeFileDocumentContent(getContext(), filedocument.getMendixObject(), filedocument.getName(), new ByteArrayInputStream("".getBytes("UTF-8")));
return true;
// END USER CODE