com.ctc.wstx.io
Class InputSourceFactory

java.lang.Object
  extended by com.ctc.wstx.io.InputSourceFactory

public final class InputSourceFactory
extends java.lang.Object

Factory class that creates instances of WstxInputSource to allow reading input from various sources.


Constructor Summary
InputSourceFactory()
           
 
Method Summary
static WstxInputSource constructCharArraySource(WstxInputSource parent, java.lang.String fromEntity, char[] text, int offset, int len, javax.xml.stream.Location loc, java.net.URL src)
          Factory method usually used to expand internal parsed entities; in which case context remains mostly the same.
static BranchingReaderSource constructDocumentSource(ReaderConfig cfg, InputBootstrapper bs, java.lang.String pubId, java.lang.String sysId, java.net.URL src, java.io.Reader r, boolean realClose)
          Factory method used for creating the main-level document reader source.
static ReaderSource constructEntitySource(ReaderConfig cfg, WstxInputSource parent, java.lang.String entityName, InputBootstrapper bs, java.lang.String pubId, java.lang.String sysId, int xmlVersion, java.net.URL src, java.io.Reader r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputSourceFactory

public InputSourceFactory()
Method Detail

constructEntitySource

public static ReaderSource constructEntitySource(ReaderConfig cfg,
                                                 WstxInputSource parent,
                                                 java.lang.String entityName,
                                                 InputBootstrapper bs,
                                                 java.lang.String pubId,
                                                 java.lang.String sysId,
                                                 int xmlVersion,
                                                 java.net.URL src,
                                                 java.io.Reader r)
Parameters:
parent -
entityName - Name of the entity expanded to create this input source: null when source created for the (main level) external DTD subset entity.
xmlVersion - Optional xml version identifier of the main parsed document. Currently only relevant for checking that XML 1.0 document does not include XML 1.1 external parsed entities. If unknown, no checks will be done.

constructDocumentSource

public static BranchingReaderSource constructDocumentSource(ReaderConfig cfg,
                                                            InputBootstrapper bs,
                                                            java.lang.String pubId,
                                                            java.lang.String sysId,
                                                            java.net.URL src,
                                                            java.io.Reader r,
                                                            boolean realClose)
Factory method used for creating the main-level document reader source.


constructCharArraySource

public static WstxInputSource constructCharArraySource(WstxInputSource parent,
                                                       java.lang.String fromEntity,
                                                       char[] text,
                                                       int offset,
                                                       int len,
                                                       javax.xml.stream.Location loc,
                                                       java.net.URL src)
Factory method usually used to expand internal parsed entities; in which case context remains mostly the same.