com.ctc.wstx.api.ReaderConfig.safeGetProperty()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(52)

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

ReaderConfig.safeGetProperty介绍

暂无

代码示例

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

public Object getProperty(String name)
{
  /* 18-Nov-2008, TSa: As per [WSTX-50], should report the
   *   actual Base URL. It can be overridden by matching
   *   setProperty, but if not, is set to actual source
   *   of content being parsed.
   */
  if (WstxInputProperties.P_BASE_URL.equals(name)) {
    try {
      return mInput.getSource();
    } catch (IOException e) { // not optimal but...
      throw new IllegalStateException(e);
    }
  }
  /* 23-Apr-2008, TSa: Let's NOT throw IllegalArgumentException
   *   for unknown property; JavaDocs do not suggest it needs
   *   to be done (different from that of XMLInputFactory
   *   and XMLStreamWriter specification)
   */
  return mConfig.safeGetProperty(name);
}

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

public Object getProperty(String name)
{
  /* 18-Nov-2008, TSa: As per [WSTX-50], should report the
   *   actual Base URL. It can be overridden by matching
   *   setProperty, but if not, is set to actual source
   *   of content being parsed.
   */
  if (WstxInputProperties.P_BASE_URL.equals(name)) {
    try {
      return mInput.getSource();
    } catch (IOException e) { // not optimal but...
      throw new IllegalStateException(e);
    }
  }
  /* 23-Apr-2008, TSa: Let's NOT throw IllegalArgumentException
   *   for unknown property; JavaDocs do not suggest it needs
   *   to be done (different from that of XMLInputFactory
   *   and XMLStreamWriter specification)
   */
  return mConfig.safeGetProperty(name);
}

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

@Override
public Object getProperty(String name)
{
  /* 18-Nov-2008, TSa: As per [WSTX-50], should report the
   *   actual Base URL. It can be overridden by matching
   *   setProperty, but if not, is set to actual source
   *   of content being parsed.
   */
  if (WstxInputProperties.P_BASE_URL.equals(name)) {
    try {
      return mInput.getSource();
    } catch (IOException e) { // not optimal but...
      throw new IllegalStateException(e);
    }
  }
  /* 23-Apr-2008, TSa: Let's NOT throw IllegalArgumentException
   *   for unknown property; JavaDocs do not suggest it needs
   *   to be done (different from that of XMLInputFactory
   *   and XMLStreamWriter specification)
   */
  return mConfig.safeGetProperty(name);
}

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

@Override
public Object getProperty(String name)
{
  /* 18-Nov-2008, TSa: As per [WSTX-50], should report the
   *   actual Base URL. It can be overridden by matching
   *   setProperty, but if not, is set to actual source
   *   of content being parsed.
   */
  if (WstxInputProperties.P_BASE_URL.equals(name)) {
    try {
      return mInput.getSource();
    } catch (IOException e) { // not optimal but...
      throw new IllegalStateException(e);
    }
  }
  /* 23-Apr-2008, TSa: Let's NOT throw IllegalArgumentException
   *   for unknown property; JavaDocs do not suggest it needs
   *   to be done (different from that of XMLInputFactory
   *   and XMLStreamWriter specification)
   */
  return mConfig.safeGetProperty(name);
}

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

@Override
public Object getProperty(String name)
{
  /* 18-Nov-2008, TSa: As per [WSTX-50], should report the
   *   actual Base URL. It can be overridden by matching
   *   setProperty, but if not, is set to actual source
   *   of content being parsed.
   */
  if (WstxInputProperties.P_BASE_URL.equals(name)) {
    try {
      return mInput.getSource();
    } catch (IOException e) { // not optimal but...
      throw new IllegalStateException(e);
    }
  }
  /* 23-Apr-2008, TSa: Let's NOT throw IllegalArgumentException
   *   for unknown property; JavaDocs do not suggest it needs
   *   to be done (different from that of XMLInputFactory
   *   and XMLStreamWriter specification)
   */
  return mConfig.safeGetProperty(name);
}

相关文章

微信公众号

最新文章

更多

ReaderConfig类方法