Tabnine Logo
StreamBootstrapper.getInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
getInstance
method
in
com.ctc.wstx.io.StreamBootstrapper

Best Java code snippets using com.ctc.wstx.io.StreamBootstrapper.getInstance (Showing top 20 results out of 315)

origin: org.apache.hadoop/hadoop-common

private XMLStreamReader parse(InputStream is, String systemIdStr,
  boolean restricted) throws IOException, XMLStreamException {
 if (!quietmode) {
  LOG.debug("parsing input stream " + is);
 }
 if (is == null) {
  return null;
 }
 SystemId systemId = SystemId.construct(systemIdStr);
 ReaderConfig readerConfig = XML_INPUT_FACTORY.createPrivateConfig();
 if (restricted) {
  readerConfig.setProperty(XMLInputFactory.SUPPORT_DTD, false);
 }
 return XML_INPUT_FACTORY.createSR(readerConfig, systemId,
   StreamBootstrapper.getInstance(null, systemId, is), false, true);
}
origin: org.codehaus.woodstox/woodstox-core-asl

private XMLStreamReader2 createSR(ReaderConfig cfg, SystemId systemId,
    InputStream in, boolean forER, boolean autoCloseInput)
  throws XMLStreamException
{
  return doCreateSR(cfg, systemId,
     StreamBootstrapper.getInstance(null, systemId, in),
     forER, autoCloseInput);
}
origin: org.codehaus.woodstox/woodstox-core-asl

public XMLValidationSchema createSchema(File f)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  try {
    URL url = f.toURL();
    return doCreateSchema(rcfg, StreamBootstrapper.getInstance
               (null, null, new FileInputStream(f)),
               null, url.toExternalForm(), url);
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}
origin: org.codehaus.woodstox/woodstox-core-asl

public XMLValidationSchema createSchema(InputStream in, String encoding,
    String publicId, String systemId)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  return doCreateSchema(rcfg, StreamBootstrapper.getInstance
      (publicId, SystemId.construct(systemId), in), publicId, systemId, null);
}
origin: org.codehaus.woodstox/woodstox-core-asl

public XMLValidationSchema createSchema(URL url)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  try {
    InputStream in = URLUtil.inputStreamFromURL(url);
    return doCreateSchema(rcfg, StreamBootstrapper.getInstance
               (null, null, in),
               null, url.toExternalForm(), url);
  } catch (IOException ioe) {
    throw new WstxIOException(ioe);
  }
}
origin: org.codehaus.woodstox/woodstox-core-asl

protected XMLStreamReader2 createSR(SystemId systemId, InputStream in, String enc,
    boolean forER, boolean autoCloseInput)
  throws XMLStreamException
{
  // sanity check:
  if (in == null) {
    throw new IllegalArgumentException("Null InputStream is not a valid argument");
  }
  ReaderConfig cfg = createPrivateConfig();
  if (enc == null || enc.length() == 0) {
    return createSR(cfg, systemId, StreamBootstrapper.getInstance
            (null, systemId, in), forER, autoCloseInput);
  }
  /* !!! 17-Feb-2006, TSa: We don't yet know if it's xml 1.0 or 1.1;
   *   so have to specify 1.0 (which is less restrictive WRT input
   *   streams). Would be better to let bootstrapper deal with it
   *   though:
   */
  Reader r = DefaultInputResolver.constructOptimizedReader(cfg, in, false, enc);
  return createSR(cfg, systemId, ReaderBootstrapper.getInstance
          (null, systemId, r, enc), forER, autoCloseInput);
}
origin: org.codehaus.woodstox/woodstox-core-asl

private static WstxInputSource sourceFromURL(WstxInputSource parent, ReaderConfig cfg,
                       String refName, int xmlVersion,
                       URL url,
                       String pubId)
  throws IOException, XMLStreamException
{
  /* And then create the input source. Note that by default URL's
   * own input stream creation creates buffered reader -- for us
   * that's useless and wasteful (adds one unnecessary level of
   * caching, halving the speed due to copy operations needed), so
   * let's avoid it.
   */
  InputStream in = URLUtil.inputStreamFromURL(url);
  SystemId sysId = SystemId.construct(url);
  StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, sysId, in);
  Reader r = bs.bootstrapInput(cfg, false, xmlVersion);
  return InputSourceFactory.constructEntitySource
    (cfg, parent, refName, bs, pubId, sysId, xmlVersion, r);
}
origin: org.codehaus.woodstox/woodstox-core-asl

private static WstxInputSource sourceFromIS(WstxInputSource parent,
    ReaderConfig cfg, String refName, int xmlVersion,
    InputStream is, String pubId, String sysId)
  throws IOException, XMLStreamException
{
  StreamBootstrapper bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), is);
  Reader r = bs.bootstrapInput(cfg, false, xmlVersion);
  URL ctxt = parent.getSource();
  // If we got a real sys id, we do know the source...
  if (sysId != null && sysId.length() > 0) {
    ctxt = URLUtil.urlFromSystemId(sysId, ctxt);
  }
  return InputSourceFactory.constructEntitySource
    (cfg, parent, refName, bs, pubId, SystemId.construct(sysId, ctxt),
        xmlVersion, r);
}
origin: org.codehaus.woodstox/woodstox-core-asl

private static WstxInputSource sourceFromSS(WstxInputSource parent, ReaderConfig cfg,
    String refName, int xmlVersion, StreamSource ssrc)
  throws IOException, XMLStreamException
{
  InputBootstrapper bs;
  Reader r = ssrc.getReader();
  String pubId = ssrc.getPublicId();
  String sysId0 = ssrc.getSystemId();
  URL ctxt = (parent == null) ? null : parent.getSource();
  URL url = (sysId0 == null || sysId0.length() == 0) ? null
    : URLUtil.urlFromSystemId(sysId0, ctxt);
  final SystemId systemId = SystemId.construct(sysId0, (url == null) ? ctxt : url);
  
  if (r == null) {
    InputStream in = ssrc.getInputStream();
    if (in == null) { // Need to try just resolving the system id then
      if (url == null) {
        throw new IllegalArgumentException("Can not create Stax reader for a StreamSource -- neither reader, input stream nor system id was set.");
      }
      in = URLUtil.inputStreamFromURL(url);
    }
    bs = StreamBootstrapper.getInstance(pubId, systemId, in);
  } else {
    bs = ReaderBootstrapper.getInstance(pubId, systemId, r, null);
  }
  
  Reader r2 = bs.bootstrapInput(cfg, false, xmlVersion);
  return InputSourceFactory.constructEntitySource
    (cfg, parent, refName, bs, pubId, systemId, xmlVersion, r2);
}
origin: org.codehaus.woodstox/woodstox-core-asl

bs = StreamBootstrapper.getInstance(publicId, systemId, is);
mScanner = (BasicStreamReader) mStaxFactory.createSR(cfg, systemId, bs, false, false);
origin: org.codehaus.woodstox/woodstox-core-asl

    bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), bas.getBuffer(), bas.getBufferStart(), bas.getBufferEnd());
  } else {
    in = ss.constructInputStream();
  bs = ReaderBootstrapper.getInstance(pubId, SystemId.construct(sysId), r, encoding);
} else if (in != null) {
  bs = StreamBootstrapper.getInstance(pubId, SystemId.construct(sysId), in);
} else if (sysId != null && sysId.length() > 0) {
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

private XMLStreamReader2 createSR(ReaderConfig cfg, URL src, InputStream in,
                 boolean forER,
                 boolean autoCloseInput)
  throws XMLStreamException
{
  String systemId = src.toExternalForm();
  return doCreateSR(cfg, systemId,
          StreamBootstrapper.getInstance(in, null, systemId),
          src, forER, autoCloseInput);
}
origin: com.fasterxml.woodstox/woodstox-core

private XMLStreamReader2 createSR(ReaderConfig cfg, SystemId systemId,
    InputStream in, boolean forER, boolean autoCloseInput)
  throws XMLStreamException
{
  return doCreateSR(cfg, systemId,
     StreamBootstrapper.getInstance(null, systemId, in),
     forER, autoCloseInput);
}
origin: woodstox/wstx-asl

private XMLStreamReader2 createSR(ReaderConfig cfg, URL src, InputStream in,
                 boolean forER,
                 boolean autoCloseInput)
  throws XMLStreamException
{
  String systemId = src.toExternalForm();
  return doCreateSR(cfg, systemId,
          StreamBootstrapper.getInstance(in, null, systemId),
          src, forER, autoCloseInput);
}
origin: org.codehaus.woodstox/woodstox-core-lgpl

private XMLStreamReader2 createSR(ReaderConfig cfg, SystemId systemId,
    InputStream in, boolean forER, boolean autoCloseInput)
  throws XMLStreamException
{
  return doCreateSR(cfg, systemId,
     StreamBootstrapper.getInstance(null, systemId, in),
     forER, autoCloseInput);
}
origin: woodstox/wstx-lgpl

public XMLStreamReader createXMLStreamReader(String systemId, InputStream in)
  throws XMLStreamException
{
  return createSR(systemId, StreamBootstrapper.getInstance(in, null, systemId));
}
origin: woodstox/wstx-asl

public XMLValidationSchema createSchema(InputStream in, String encoding,
                    String publicId, String systemId)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  return doCreateSchema(rcfg, StreamBootstrapper.getInstance
             (in, publicId, systemId), publicId, systemId, null);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

public XMLValidationSchema createSchema(InputStream in, String encoding,
                    String publicId, String systemId)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  return doCreateSchema(rcfg, StreamBootstrapper.getInstance
             (in, publicId, systemId), publicId, systemId, null);
}
origin: com.fasterxml.woodstox/woodstox-core

@Override
public XMLValidationSchema createSchema(InputStream in, String encoding,
    String publicId, String systemId)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  return doCreateSchema(rcfg, StreamBootstrapper.getInstance
      (publicId, SystemId.construct(systemId), in), publicId, systemId, null);
}
origin: org.codehaus.woodstox/woodstox-core-lgpl

public XMLValidationSchema createSchema(InputStream in, String encoding,
    String publicId, String systemId)
  throws XMLStreamException
{
  ReaderConfig rcfg = createPrivateReaderConfig();
  return doCreateSchema(rcfg, StreamBootstrapper.getInstance
      (publicId, SystemId.construct(systemId), in), publicId, systemId, null);
}
com.ctc.wstx.ioStreamBootstrappergetInstance

Javadoc

Factory method used when the underlying data provider is an actual stream.

Popular methods of StreamBootstrapper

  • <init>
  • bootstrapInput
  • checkMbKeyword
  • checkSbKeyword
  • checkTranslatedKeyword
  • ensureLoaded
  • getLocation
  • getNext
  • hasXmlDecl
  • loadMore
  • nextByte
  • nextMultiByte
  • nextByte,
  • nextMultiByte,
  • nextTranslated,
  • readXmlDecl,
  • reportNull,
  • reportUnexpectedChar,
  • reportWeirdUCS4,
  • reportXmlProblem,
  • resolveStreamEncoding

Popular in Java

  • Updating database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now