Checkout the wt.content package in Foundation.
I think you want something like this.
import wt.content.*
...
EPMDocument doc = ...
ContentItem contentItem = ContentHelper.getPrimary(doc);
float sizeInKb = 0;
if (contentItem instanceof ApplicationData) { // as opposed to ExternalData or URLData
sizeInKb = ((ApplicationData)contentItem).getFileSizeKB();
}
I haven't tried it and I'm not sure if these methods are supported and it might be more efficient to write some query but this seems reasonable.