// Don't send content that is too big or too small.
long contentSize = object.getContentSize();
TraversalContext traversalContext = traversalManager.getTraversalContext();
// Don't send content whose mimetype is not supported.
IFormat format = object.getFormat();
String mimetype = format.getMIMEType();
if (traversalContext != null) {
int supportLevel = traversalContext.mimeTypeSupportLevel(mimetype);
if (supportLevel < 0) {
if (logging) {
logger.fine("excluded content format: " + format.getName());
}
throw new SkippedDocumentException("Excluded by content type: "
+ mimetype);
}
if (supportLevel == 0) {
if (logging) {
logger.fine("unindexable content format: " + format.getName());
}
return false;
}
if (contentSize > traversalContext.maxDocumentSize()) {
if (logging) {
logger.fine("content is too large: " + contentSize);
}
return false;
}
} else {
if (!format.canIndex()) {
if (logging) {
logger.fine("unindexable content format: " + format.getName());
}
return false;
}
if (contentSize > MAX_CONTENT_SIZE) {
if (logging) {