if (!needsDir(aggregate)) {
return SerializationData.empty(fileOrFolderPathHint, serializationKind);
}
DocViewSerializer s = new DocViewSerializer(aggregate);
ByteArrayOutputStream out = new ByteArrayOutputStream();
s.writeContent(out);
byte[] result = out.toByteArray();
return new SerializationData(fileOrFolderPathHint, nameHint, result, serializationKind);