// Finally, assume plain text if no control bytes are found
try {
TextDetector detector = new TextDetector(getMinLength());
ByteArrayInputStream stream = new ByteArrayInputStream(data);
MimeType type = forName(detector.detect(stream, new Metadata()).toString());
return Collections.singletonList(type);
} catch (Exception e) {
return rootMimeTypeL;
}
}