You shouldn't be attempting to create files directly in the content store. Instead you should be using a contentWriter.
So you create a node with nodeService or fileFolderService, get a content writer and then write the cm:content property.
// Something like this.
ChildAssociationRef childRef = nodeService.createNode(rootNodeRef, ContentModel.ASSOC_CONTAINS, localQName, ContentModel.CONTENT, contentProps);
ContentWriter writer = fileFolderService.getWriter(childRef.yyyy);
writer.setMimetype(file.getMimeType());
writer.setEncoding(file.getEncoding());
writer.putContent(xxx);
Actua