1 package javax.xml.stream; 2 3 import javax.xml.transform.Source ; 4 import javax.xml.stream.util.XMLEventAllocator; 5 6 53 54 public abstract class XMLInputFactory { 55 60 public static final String IS_NAMESPACE_AWARE= 61 "javax.xml.stream.isNamespaceAware"; 62 63 66 public static final String IS_VALIDATING= 67 "javax.xml.stream.isValidating"; 68 69 72 public static final String IS_COALESCING= 73 "javax.xml.stream.isCoalescing"; 74 75 80 public static final String IS_REPLACING_ENTITY_REFERENCES= 81 "javax.xml.stream.isReplacingEntityReferences"; 82 83 86 public static final String IS_SUPPORTING_EXTERNAL_ENTITIES= 87 "javax.xml.stream.isSupportingExternalEntities"; 88 89 92 public static final String SUPPORT_DTD= 93 "javax.xml.stream.supportDTD"; 94 95 99 public static final String REPORTER= 100 "javax.xml.stream.reporter"; 101 102 105 public static final String RESOLVER= 106 "javax.xml.stream.resolver"; 107 108 111 public static final String ALLOCATOR= 112 "javax.xml.stream.allocator"; 113 114 protected XMLInputFactory(){} 115 116 134 public static XMLInputFactory newInstance() 135 throws FactoryConfigurationError 136 { 137 return (XMLInputFactory) FactoryFinder.find( 138 "javax.xml.stream.XMLInputFactory", 139 "com.sun.xml.internal.stream.XMLInputFactoryImpl"); 140 } 141 142 151 public static XMLInputFactory newInstance(String factoryId, 152 ClassLoader classLoader) 153 throws FactoryConfigurationError { 154 try { 155 return (XMLInputFactory) FactoryFinder.newInstance(factoryId, classLoader, false); 157 } catch (FactoryFinder.ConfigurationError e) { 158 throw new FactoryConfigurationError(e.getException(), 159 e.getMessage()); 160 } 161 } 162 163 168 public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) 169 throws XMLStreamException; 170 171 178 public abstract XMLStreamReader createXMLStreamReader(Source source) 179 throws XMLStreamException; 180 181 186 public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) 187 throws XMLStreamException; 188 189 195 public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, String encoding) 196 throws XMLStreamException; 197 198 203 public abstract XMLStreamReader createXMLStreamReader(String systemId, java.io.InputStream stream) 204 throws XMLStreamException; 205 206 211 public abstract XMLStreamReader createXMLStreamReader(String systemId, java.io.Reader reader) 212 throws XMLStreamException; 213 214 219 public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) 220 throws XMLStreamException; 221 222 228 public abstract XMLEventReader createXMLEventReader(String systemId, java.io.Reader reader) 229 throws XMLStreamException; 230 231 239 public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) 240 throws XMLStreamException; 241 242 249 public abstract XMLEventReader createXMLEventReader(Source source) 250 throws XMLStreamException; 251 252 257 public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) 258 throws XMLStreamException; 259 260 266 public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) 267 throws XMLStreamException; 268 269 275 public abstract XMLEventReader createXMLEventReader(String systemId, java.io.InputStream stream) 276 throws XMLStreamException; 277 278 284 public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) 285 throws XMLStreamException; 286 287 293 public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) 294 throws XMLStreamException; 295 296 300 public abstract XMLResolver getXMLResolver(); 301 302 307 public abstract void setXMLResolver(XMLResolver resolver); 308 309 313 public abstract XMLReporter getXMLReporter(); 314 315 320 public abstract void setXMLReporter(XMLReporter reporter); 321 322 330 public abstract void setProperty(java.lang.String name, Object value) 331 throws java.lang.IllegalArgumentException ; 332 333 339 public abstract Object getProperty(java.lang.String name) 340 throws java.lang.IllegalArgumentException ; 341 342 343 349 public abstract boolean isPropertySupported(String name); 350 351 355 public abstract void setEventAllocator(XMLEventAllocator allocator); 356 357 360 public abstract XMLEventAllocator getEventAllocator(); 361 362 } 363 364 | Popular Tags |