com.centit.support.xml.IgnoreDTDEntityResolver Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of centit-utils Show documentation
Show all versions of centit-utils Show documentation
java 常用工具类,作为 apache-commons的补充
package com.centit.support.xml;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
public class IgnoreDTDEntityResolver implements EntityResolver {
public InputSource resolveEntity(String publicId,
String systemId) throws SAXException, IOException {
return new InputSource(
new ByteArrayInputStream(
"".getBytes()));
}
}