@Test(expected = IllegalArgumentException.class) public void should_not_read_null_input_stream() throws Exception { formatDetector.detect(null); }
@Override public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException { Format result = null; for (Detector detector : detectors) { result = detector.detect(metadata, inputStream); if (result != null) break; } if (result == null) { result = new Format(unsupportedFormatFamily, FormatUtils.DEFAULT_ENCODING); } return result; }
CompositeFormatDetector implements Detector { @Override public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException { Format result = null; for (Detector detector : detectors) { result = detector.detect(metadata, inputStream); if (result != null) break; } if (result == null) { result = new Format(unsupportedFormatFamily, FormatUtils.DEFAULT_ENCODING); } return result; } }
CompositeFormatDetector implements Detector { @Override public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException { Format result = null; for (Detector detector : detectors) { result = detector.detect(metadata, inputStream); if (result != null) break; } if (result == null) { result = new Format(unsupportedFormatFamily, FormatUtils.DEFAULT_ENCODING); } return result; }  }
CompositeFormatDetector implements Detector { @Override public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException { Format result = null; for (Detector detector : detectors) { result = detector.detect(metadata, inputStream); if (result != null) break; } if (result == null) { result = new Format(unsupportedFormatFamily, FormatUtils.DEFAULT_ENCODING); } return result; }  @Override Format detect(Metadata metadata, TikaInputStream inputStream); }
CompositeFormatDetector implements Detector { @Override public Format detect(Metadata metadata, TikaInputStream inputStream) throws IOException { Format result = null; for (Detector detector : detectors) { result = detector.detect(metadata, inputStream); if (result != null) break; } if (result == null) { result = new Format(unsupportedFormatFamily, FormatUtils.DEFAULT_ENCODING); } return result; }  @Override Format detect(Metadata metadata, TikaInputStream inputStream);  }