}
else if (fileEntity instanceof ContainerFile) {
return (int) ((ContainerFile) fileEntity).getData().length();
}
else {
throw new WGBackendException("Unknown file entity type " + fileEntity.getClass().getName());
}
}
else {
return -1;
}
/* if (_content != null) {
ContentFile fileAtt = (ContentFile) _content.getFiles().get(strFile);
if (fileAtt == null) {
return -1;
}
return (int) fileAtt.getData().length();
}
else if (_entity instanceof FileContainer) {
FileContainer cont = (FileContainer) _entity;
ContainerFile fileAtt = (ContainerFile) cont.getFiles().get(strFile);
if (fileAtt == null) {
return -1;
}
return (int) fileAtt.getData().length();
}
else {
return -1;
}*/
}
catch (HibernateException e) {
throw new WGBackendException("Error retrieving blob size", e);
}
catch (SQLException e) {
throw new WGBackendException("Error retrieving blob size", e);
}
}