@Test public void testXMLReaderUtils() throws Exception { assertEquals(XMLReaderUtils.DEFAULT_MAX_ENTITY_EXPANSIONS, XMLReaderUtils.getMaxEntityExpansions()); assertEquals("application/rdf+xml", detect("test-difficult-rdf1.xml", TikaConfig.getDefaultConfig()).toString()); TikaConfig tikaConfig = getConfig("TIKA-2732-xmlreaderutils.xml"); try { assertEquals(33, XMLReaderUtils.getPoolSize()); assertEquals(5, XMLReaderUtils.getMaxEntityExpansions()); assertEquals("text/plain", detect("test-difficult-rdf1.xml", tikaConfig).toString()); } finally { XMLReaderUtils.setMaxEntityExpansions(XMLReaderUtils.DEFAULT_MAX_ENTITY_EXPANSIONS); XMLReaderUtils.setPoolSize(XMLReaderUtils.DEFAULT_POOL_SIZE); } }
public static TikaConfig getDefaultConfig() { try { return new TikaConfig(); } catch (IOException e) { throw new RuntimeException( "Unable to read default configuration", e); } catch (TikaException e) { throw new RuntimeException( "Unable to access default configuration", e); } }
TikaConfig { public static TikaConfig getDefaultConfig() { try { return new TikaConfig(); } catch (IOException e) { throw new RuntimeException( "Unable to read default configuration", e); } catch (TikaException e) { throw new RuntimeException( "Unable to access default configuration", e); } } }
TikaConfig { public static TikaConfig getDefaultConfig() { try { return new TikaConfig(); } catch (IOException e) { throw new RuntimeException( "Unable to read default configuration", e); } catch (TikaException e) { throw new RuntimeException( "Unable to access default configuration", e); } } TikaConfig(String file);  TikaConfig(Path path);  TikaConfig(Path path, ServiceLoader loader);  TikaConfig(File file);  TikaConfig(File file, ServiceLoader loader);  TikaConfig(URL url);  TikaConfig(URL url, ClassLoader loader);  TikaConfig(URL url, ServiceLoader loader);  TikaConfig(InputStream stream);  TikaConfig(Document document);  TikaConfig(Document document, ServiceLoader loader);  TikaConfig(Element element);  TikaConfig(Element element, ClassLoader loader); private  TikaConfig(Element element, ServiceLoader loader);  TikaConfig(ClassLoader loader);  TikaConfig(); }
TikaConfig { public static TikaConfig getDefaultConfig() { try { return new TikaConfig(); } catch (IOException e) { throw new RuntimeException( "Unable to read default configuration", e); } catch (TikaException e) { throw new RuntimeException( "Unable to access default configuration", e); } } TikaConfig(String file);  TikaConfig(Path path);  TikaConfig(Path path, ServiceLoader loader);  TikaConfig(File file);  TikaConfig(File file, ServiceLoader loader);  TikaConfig(URL url);  TikaConfig(URL url, ClassLoader loader);  TikaConfig(URL url, ServiceLoader loader);  TikaConfig(InputStream stream);  TikaConfig(Document document);  TikaConfig(Document document, ServiceLoader loader);  TikaConfig(Element element);  TikaConfig(Element element, ClassLoader loader); private  TikaConfig(Element element, ServiceLoader loader);  TikaConfig(ClassLoader loader);  TikaConfig(); Parser getParser(MediaType mimeType); Parser getParser(); Detector getDetector(); EncodingDetector getEncodingDetector(); Translator getTranslator(); ExecutorService getExecutorService(); MimeTypes getMimeRepository(); MediaTypeRegistry getMediaTypeRegistry(); ServiceLoader getServiceLoader(); MetadataFilter getMetadataFilter(); static TikaConfig getDefaultConfig(); }
TikaConfig { public static TikaConfig getDefaultConfig() { try { return new TikaConfig(); } catch (IOException e) { throw new RuntimeException( "Unable to read default configuration", e); } catch (TikaException e) { throw new RuntimeException( "Unable to access default configuration", e); } } TikaConfig(String file);  TikaConfig(Path path);  TikaConfig(Path path, ServiceLoader loader);  TikaConfig(File file);  TikaConfig(File file, ServiceLoader loader);  TikaConfig(URL url);  TikaConfig(URL url, ClassLoader loader);  TikaConfig(URL url, ServiceLoader loader);  TikaConfig(InputStream stream);  TikaConfig(Document document);  TikaConfig(Document document, ServiceLoader loader);  TikaConfig(Element element);  TikaConfig(Element element, ClassLoader loader); private  TikaConfig(Element element, ServiceLoader loader);  TikaConfig(ClassLoader loader);  TikaConfig(); Parser getParser(MediaType mimeType); Parser getParser(); Detector getDetector(); EncodingDetector getEncodingDetector(); Translator getTranslator(); ExecutorService getExecutorService(); MimeTypes getMimeRepository(); MediaTypeRegistry getMediaTypeRegistry(); ServiceLoader getServiceLoader(); MetadataFilter getMetadataFilter(); static TikaConfig getDefaultConfig();  }