gpt4 book ai didi

com.ctc.wstx.io.WstxInputData.copyBufferStateFrom()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 20:21:05 27 4
gpt4 key购买 nike

本文整理了Java中com.ctc.wstx.io.WstxInputData.copyBufferStateFrom()方法的一些代码示例,展示了WstxInputData.copyBufferStateFrom()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WstxInputData.copyBufferStateFrom()方法的具体详情如下:
包路径:com.ctc.wstx.io.WstxInputData
类名称:WstxInputData
方法名:copyBufferStateFrom

WstxInputData.copyBufferStateFrom介绍

[英]Note: Only public due to sub-classes needing to call this on base class instance from different package (confusing?)
[中]注意:由于子类需要在不同包的基类实例上调用这个,所以只有public(混乱?)

代码示例

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: FasterXML/woodstox

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: Nextdoor/bender

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: woodstox/wstx-lgpl

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws IOException, XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: woodstox/wstx-asl

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws IOException, XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws IOException, XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: woodstox/wstx-asl

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws IOException, XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws IOException, XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: Nextdoor/bender

/**
 * Method called to read in the internal subset definition.
 */
public static DTDSubset readInternalSubset(WstxInputData srcData,
                      WstxInputSource input,
                      ReaderConfig cfg,
                      boolean constructFully,
                      int xmlVersion)
  throws XMLStreamException
{
  FullDTDReader r = new FullDTDReader(input, cfg, constructFully, xmlVersion);
  // Need to read using the same low-level reader interface:
  r.copyBufferStateFrom(srcData);
  DTDSubset ss;
  try {
    ss = r.parseDTD();
  } finally {
    /* And then need to restore changes back to owner (line nrs etc);
     * effectively means that we'll stop reading external DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
  return ss;
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: woodstox/wstx-lgpl

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws IOException, XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

代码示例来源:origin: FasterXML/woodstox

/**
 * Method that just skims
 * through structure of internal subset, but without doing any sort
 * of validation, or parsing of contents. Method may still throw an
 * exception, if skipping causes EOF or there's an I/O problem.
 *
 * @param srcData Link back to the input buffer shared with the owning
 *    stream reader.
 */
public static void skipInternalSubset(WstxInputData srcData, WstxInputSource input,
                   ReaderConfig cfg)
  throws XMLStreamException
{
  MinimalDTDReader r = new MinimalDTDReader(input, cfg);
  // Need to read from same source as the master (owning stream reader)
  r.copyBufferStateFrom(srcData);
  try {
    r.skipInternalSubset();
  } finally {
    /* And then need to restore changes back to srcData (line nrs etc);
     * effectively means that we'll stop reading internal DTD subset,
     * if so.
     */
    srcData.copyBufferStateFrom(r);
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com