1 16 17 package org.apache.jetspeed.xml; 18 19 import java.io.*; 20 import org.apache.jetspeed.cache.disk.*; 22 23 import org.xml.sax.*; 24 25 26 37 public class JetspeedXMLEntityResolver implements EntityResolver 38 { 39 public InputSource resolveEntity (String publicId, String systemId) 40 { 41 try { 42 Reader rdr = JetspeedDiskCache.getInstance(). 44 getEntry(systemId).getReader(); 45 InputSource is = new InputSource(rdr); 46 is.setPublicId( publicId ); 47 is.setSystemId( systemId ); 48 return is; 49 } catch(IOException x) 50 { 51 System.err.println("JER: ( " + publicId + 52 " Taking " + systemId + " from cache throwed Exception: " + x); 53 54 } 55 return null; 56 } 57 } 58 | Popular Tags |