home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / XMLUtils$Resolver.class (.txt) < prev   
Encoding:
Java Class File  |  2006-11-29  |  1.2 KB  |  27 lines

  1. package java.util;
  2.  
  3. import java.io.StringReader;
  4. import org.xml.sax.EntityResolver;
  5. import org.xml.sax.InputSource;
  6. import org.xml.sax.SAXException;
  7.  
  8. class XMLUtils$Resolver implements EntityResolver {
  9.    private XMLUtils$Resolver() {
  10.    }
  11.  
  12.    public InputSource resolveEntity(String var1, String var2) throws SAXException {
  13.       if (var2.equals("http://java.sun.com/dtd/properties.dtd")) {
  14.          InputSource var3 = new InputSource(new StringReader("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!-- DTD for properties --><!ELEMENT properties ( comment?, entry* ) ><!ATTLIST properties version CDATA #FIXED \"1.0\"><!ELEMENT comment (#PCDATA) ><!ELEMENT entry (#PCDATA) ><!ATTLIST entry  key CDATA #REQUIRED>"));
  15.          var3.setSystemId("http://java.sun.com/dtd/properties.dtd");
  16.          return var3;
  17.       } else {
  18.          throw new SAXException("Invalid system identifier: " + var2);
  19.       }
  20.    }
  21.  
  22.    // $FF: synthetic method
  23.    XMLUtils$Resolver(XMLUtils.1 var1) {
  24.       this();
  25.    }
  26. }
  27.