Debian Codegraph @

src/main/java/com/github/markusbernhardt/proxy/util/EmptyXMLResolver.java

raw symbols SCIP
1 package com.github.markusbernhardt.proxy.util;
2
3 import java.io.ByteArrayInputStream;
4 import java.io.IOException;
5
6 import org.xml.sax.EntityResolver;
7 import org.xml.sax.InputSource;
8 import org.xml.sax.SAXException;
9
10 /*****************************************************************************
11 * This resolver is used to prevent network lookups of DTD or XML schemas.
12 *
13 * @author Markus Bernhardt, Copyright 2016
14 * @author Bernd Rosstauscher, Copyright 2009
15 ****************************************************************************/
16
17 public class EmptyXMLResolver implements EntityResolver {
18
19 /*************************************************************************
20 * Overwritten to return an empty entity.
21 *
22 * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
23 * java.lang.String)
24 ************************************************************************/
25
26 public InputSource resolveEntity(String arg0, String arg1) throws SAXException, IOException {
27 return new InputSource(new ByteArrayInputStream("".getBytes()));
28 }
29
30 }