// it shouldbe, then guess a mime-type from the url pattern
type = this.mimeTypes.getMimeType(url);
typeName = type == null ? typeName : type.getName();
}
if (typeName == null || type == null
|| (this.mimeTypeMagic && type.hasMagic() && !type.matches(data))) {
// If no mime-type already found, or the one found doesn't match
// the magic bytes it should be, then, guess a mime-type from the
// document content (magic bytes)
type = this.mimeTypes.getMimeType(data);
typeName = type == null ? typeName : type.getName();