• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XMLErrorResources类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.org.apache.xml.internal.res.XMLErrorResources的典型用法代码示例。如果您正苦于以下问题:Java XMLErrorResources类的具体用法?Java XMLErrorResources怎么用?Java XMLErrorResources使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XMLErrorResources类属于com.sun.org.apache.xml.internal.res包,在下文中一共展示了XMLErrorResources类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: cloneIterator

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Returns a deep copy of this iterator.  The cloned iterator is not reset.
 *
 * @return a deep copy of this iterator.
 */
public DTMAxisIterator cloneIterator()
{
  _isRestartable = false;  // must set to false for any clone

  try
  {
    final AncestorIterator clone = (AncestorIterator) super.clone();

    clone._startNode = _startNode;

    // return clone.reset();
    return clone;
  }
  catch (CloneNotSupportedException e)
  {
    throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_ITERATOR_CLONE_NOT_SUPPORTED, null)); //"Iterator clone not supported.");
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:DTMDefaultBaseIterators.java


示例2: QName

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Constructs a new QName with the specified namespace URI and
 * local name.
 *
 * @param namespaceURI The namespace URI if known, or null
 * @param localName The local name
 * @param validate If true the new QName will be validated and an IllegalArgumentException will
 *                 be thrown if it is invalid.
 */
public QName(String namespaceURI, String localName, boolean validate)
{

  // This check was already here.  So, for now, I will not add it to the validation
  // that is done when the validate parameter is true.
  if (localName == null)
    throw new IllegalArgumentException(XMLMessages.createXMLMessage(
          XMLErrorResources.ER_ARG_LOCALNAME_NULL, null)); //"Argument 'localName' is null");

  if (validate)
  {
      if (!XML11Char.isXML11ValidNCName(localName))
      {
          throw new IllegalArgumentException(XMLMessages.createXMLMessage(
          XMLErrorResources.ER_ARG_LOCALNAME_INVALID,null )); //"Argument 'localName' not a valid NCName");
      }
  }

  _namespaceURI = namespaceURI;
  _localName = localName;
  m_hashCode = toString().hashCode();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:QName.java


示例3: cloneIterator

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Returns a deep copy of this iterator.   The cloned iterator is not reset.
 *
 * @return a deep copy of this iterator.
 */
public DTMAxisIterator cloneIterator()
{
  _isRestartable = false;

  try
  {
    final PrecedingIterator clone = (PrecedingIterator) super.clone();
    final int[] stackCopy = new int[_stack.length];
    System.arraycopy(_stack, 0, stackCopy, 0, _stack.length);

    clone._stack = stackCopy;

    // return clone.reset();
    return clone;
  }
  catch (CloneNotSupportedException e)
  {
    throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_ITERATOR_CLONE_NOT_SUPPORTED, null)); //"Iterator clone not supported.");
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:DTMDefaultBaseIterators.java


示例4: setPort

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Set the port for this URI. -1 is used to indicate that the port is
 * not specified, otherwise valid port numbers are  between 0 and 65535.
 * If a valid port number is passed in and the host field is null,
 * an exception is thrown.
 *
 * @param p_port the port number for this URI
 *
 * @throws MalformedURIException if p_port is not -1 and not a
 *                                  valid port number
 */
public void setPort(int p_port) throws MalformedURIException
{

  if (p_port >= 0 && p_port <= 65535)
  {
    if (m_host == null)
    {
      throw new MalformedURIException(
        XMLMessages.createXMLMessage(XMLErrorResources.ER_PORT_WHEN_HOST_NULL, null)); //"Port cannot be set when host is null!");
    }
  }
  else if (p_port != -1)
  {
    throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_INVALID_PORT, null)); //"Invalid port number!");
  }

  m_port = p_port;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:30,代码来源:URI.java


示例5: addNewDTMID

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Get a new DTM ID beginning at the specified node index.
 * @param  nodeIndex The node identity at which the new DTM ID will begin
 * addressing.
 */
protected void addNewDTMID(int nodeIndex) {
  try
  {
    if(m_mgr==null)
      throw new ClassCastException();

                            // Handle as Extended Addressing
    DTMManagerDefault mgrD=(DTMManagerDefault)m_mgr;
    int id=mgrD.getFirstFreeDTMID();
    mgrD.addDTM(this,id,nodeIndex);
    m_dtmIdent.addElement(id<<DTMManager.IDENT_DTM_NODE_BITS);
  }
  catch(ClassCastException e)
  {
    // %REVIEW% Wrong error message, but I've been told we're trying
    // not to add messages right not for I18N reasons.
    // %REVIEW% Should this be a Fatal Error?
    error(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null));//"No more DTM IDs are available";
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:SAX2DTM.java


示例6: startParse

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/** startParse() is a simple API which tells the IncrementalSAXSource
 * to begin reading a document.
 *
 * @throws SAXException is parse thread is already in progress
 * or parsing can not be started.
 * */
public void startParse(InputSource source) throws SAXException
{
  if (fIncrementalParser==null)
    throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_STARTPARSE_NEEDS_SAXPARSER, null)); //"startParse needs a non-null SAXParser.");
  if (fParseInProgress)
    throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_STARTPARSE_WHILE_PARSING, null)); //"startParse may not be called while parsing.");

  boolean ok=false;

  try
  {
    ok = parseSomeSetup(source);
  }
  catch(Exception ex)
  {
    throw new SAXException(ex);
  }

  if(!ok)
    throw new SAXException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COULD_NOT_INIT_PARSER, null)); //"could not initialize parser with");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:IncrementalSAXSource_Xerces.java


示例7: setScheme

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Set the scheme for this URI. The scheme is converted to lowercase
 * before it is set.
 *
 * @param p_scheme the scheme for this URI (cannot be null)
 *
 * @throws MalformedURIException if p_scheme is not a conformant
 *                                  scheme name
 */
public void setScheme(String p_scheme) throws MalformedURIException
{

  if (p_scheme == null)
  {
    throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_SCHEME_FROM_NULL_STRING, null)); //"Cannot set scheme from null string!");
  }

  if (!isConformantSchemeName(p_scheme))
  {
    throw new MalformedURIException(XMLMessages.createXMLMessage(XMLErrorResources.ER_SCHEME_NOT_CONFORMANT, null)); //"The scheme is not conformant.");
  }

  m_scheme = p_scheme.toLowerCase();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:URI.java


示例8: readEntry

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Retrieve an integer from the CIA by record number and column within
 * the record, both 0-based (though position 0 is reserved for special
 * purposes).
 * @param position int Record number
 * @param slotpos int Column number
 */
int readEntry(int position, int offset) throws ArrayIndexOutOfBoundsException
{
  /*
  try
  {
    return fastArray[(position*slotsize)+offset];
  }
  catch(ArrayIndexOutOfBoundsException aioobe)
  */
  {
    // System.out.println("Using slow read (1)");
    if (offset>=slotsize)
      throw new ArrayIndexOutOfBoundsException(XMLMessages.createXMLMessage(XMLErrorResources.ER_OFFSET_BIGGER_THAN_SLOT, null)); //"Offset bigger than slot");
    position*=slotsize;
    int chunkpos = position >> lowbits;
    int slotpos = position & lowmask;
    int[] chunk = chunks.elementAt(chunkpos);
    return chunk[slotpos + offset];
  }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:28,代码来源:ChunkedIntArray.java


示例9: writeEntry

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Overwrite the integer found at a specific record and column.
 * Used to back-patch existing records, most often changing their
 * "next sibling" reference from 0 (unknown) to something meaningful
 * @param position int Record number
 * @param offset int Column number
 * @param value int New contents
 */
void writeEntry(int position, int offset, int value) throws ArrayIndexOutOfBoundsException
{
  /*
  try
  {
    fastArray[( position*slotsize)+offset] = value;
  }
  catch(ArrayIndexOutOfBoundsException aioobe)
  */
  {
    if (offset >= slotsize)
      throw new ArrayIndexOutOfBoundsException(XMLMessages.createXMLMessage(XMLErrorResources.ER_OFFSET_BIGGER_THAN_SLOT, null)); //"Offset bigger than slot");
    position*=slotsize;
    int chunkpos = position >> lowbits;
    int slotpos = position & lowmask;
    int[] chunk = chunks.elementAt(chunkpos);
    chunk[slotpos + offset] = value; // ATOMIC!
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ChunkedIntArray.java


示例10: QName

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Constructs a new QName with the specified namespace URI, prefix
 * and local name.
 *
 * @param namespaceURI The namespace URI if known, or null
 * @param prefix The namespace prefix is known, or null
 * @param localName The local name
 * @param validate If true the new QName will be validated and an IllegalArgumentException will
 *                 be thrown if it is invalid.
 */
public QName(String namespaceURI, String prefix, String localName, boolean validate)
{

  // This check was already here.  So, for now, I will not add it to the validation
  // that is done when the validate parameter is true.
  if (localName == null)
    throw new IllegalArgumentException(XMLMessages.createXMLMessage(
          XMLErrorResources.ER_ARG_LOCALNAME_NULL, null)); //"Argument 'localName' is null");

  if (validate)
  {
      if (!XML11Char.isXML11ValidNCName(localName))
      {
          throw new IllegalArgumentException(XMLMessages.createXMLMessage(
          XMLErrorResources.ER_ARG_LOCALNAME_INVALID,null )); //"Argument 'localName' not a valid NCName");
      }

      if ((null != prefix) && (!XML11Char.isXML11ValidNCName(prefix)))
      {
          throw new IllegalArgumentException(XMLMessages.createXMLMessage(
          XMLErrorResources.ER_ARG_PREFIX_INVALID,null )); //"Argument 'prefix' not a valid NCName");
      }

  }
  _namespaceURI = namespaceURI;
  _prefix = prefix;
  _localName = localName;
  m_hashCode = toString().hashCode();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:QName.java


示例11: ChunkedIntArray

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Create a new CIA with specified record size. Currently record size MUST
 * be a power of two... and in fact is hardcoded to 4.
 */
ChunkedIntArray(int slotsize)
{
  if(this.slotsize<slotsize)
    throw new ArrayIndexOutOfBoundsException(XMLMessages.createXMLMessage(XMLErrorResources.ER_CHUNKEDINTARRAY_NOT_SUPPORTED, new Object[]{Integer.toString(slotsize)})); //"ChunkedIntArray("+slotsize+") not currently supported");
  else if (this.slotsize>slotsize)
    System.out.println("*****WARNING: ChunkedIntArray("+slotsize+") wasting "+(this.slotsize-slotsize)+" words per slot");
  chunks.addElement(fastArray);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:ChunkedIntArray.java


示例12: co_exit_to

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/** Make the ID available for reuse and terminate this coroutine,
 * transferring control to the specified coroutine. Note that this
 * returns immediately rather than waiting for any further coroutine
 * traffic, so the thread can proceed with other shutdown activities.
 *
 * @param arg_object    A value to be passed to the other coroutine.
 * @param thisCoroutine Integer identifier for the coroutine leaving the set.
 * @param toCoroutine   Integer identifier for the coroutine we wish to
 * invoke.
 * @exception java.lang.NoSuchMethodException if toCoroutine isn't a
 * registered member of this group. %REVIEW% whether this is the best choice.
 * */
public synchronized void co_exit_to(Object arg_object,int thisCoroutine,int toCoroutine) throws java.lang.NoSuchMethodException
{
  if(!m_activeIDs.get(toCoroutine))
    throw new java.lang.NoSuchMethodException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COROUTINE_NOT_AVAIL, new Object[]{Integer.toString(toCoroutine)})); //"Coroutine not available, id="+toCoroutine);

  // We expect these values to be overwritten during the notify()/wait()
  // periods, as other coroutines in this set get their opportunity to run.
  m_yield=arg_object;
  m_nextCoroutine=toCoroutine;

  m_activeIDs.clear(thisCoroutine);

  notify();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:CoroutineManager.java


示例13: init

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
public void init( CoroutineManager co, int controllerCoroutineID,
                  int sourceCoroutineID)
{
  if(co==null)
    co = new CoroutineManager();
  fCoroutineManager = co;
  fControllerCoroutineID = co.co_joinCoroutineSet(controllerCoroutineID);
  fSourceCoroutineID = co.co_joinCoroutineSet(sourceCoroutineID);
  if (fControllerCoroutineID == -1 || fSourceCoroutineID == -1)
    throw new RuntimeException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COJOINROUTINESET_FAILED, null)); //"co_joinCoroutineSet() failed");

  fNoMoreEvents=false;
  eventcounter=frequency;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:15,代码来源:IncrementalSAXSource_Filter.java


示例14: hasChildNodes

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.Node
 *
 * @return false
 */
public boolean hasChildNodes()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"hasChildNodes not supported!");

  return false;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:UnImplNode.java


示例15: getChildNodes

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.Node
 *
 * @return null
 */
public NodeList getChildNodes()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"getChildNodes not supported!");

  return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:UnImplNode.java


示例16: getNextSibling

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.Node
 *
 * @return null
 */
public Node getNextSibling()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"getNextSibling not supported!");

  return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:UnImplNode.java


示例17: getDoctype

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.Document
 *
 * @return null
 */
public DocumentType getDoctype()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);

  return null;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:UnImplNode.java


示例18: item

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.NodeList
 *
 * @param index index of a child of this node in its list of children
 *
 * @return null
 */
public Node item(int index)
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"item not supported!");

  return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:UnImplNode.java


示例19: addDTM

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Add a DTM to the DTM table.
 *
 * @param dtm Should be a valid reference to a DTM.
 * @param id Integer DTM ID to be bound to this DTM.
 * @param offset Integer addressing offset. The internal DTM Node ID is
 * obtained by adding this offset to the node-number field of the
 * public DTM Handle. For the first DTM ID accessing each DTM, this is 0;
 * for overflow addressing it will be a multiple of 1<<IDENT_DTM_NODE_BITS.
 */
synchronized public void addDTM(DTM dtm, int id, int offset)
{
              if(id>=IDENT_MAX_DTMS)
              {
                      // TODO: %REVIEW% Not really the right error message.
          throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No more DTM IDs are available!");
              }

              // We used to just allocate the array size to IDENT_MAX_DTMS.
              // But we expect to increase that to 16 bits, and I'm not willing
              // to allocate that much space unless needed. We could use one of our
              // handy-dandy Fast*Vectors, but this will do for now.
              // %REVIEW%
              int oldlen=m_dtms.length;
              if(oldlen<=id)
              {
                      // Various growth strategies are possible. I think we don't want
                      // to over-allocate excessively, and I'm willing to reallocate
                      // more often to get that. See also Fast*Vector classes.
                      //
                      // %REVIEW% Should throw a more diagnostic error if we go over the max...
                      int newlen=Math.min((id+256),IDENT_MAX_DTMS);

                      DTM new_m_dtms[] = new DTM[newlen];
                      System.arraycopy(m_dtms,0,new_m_dtms,0,oldlen);
                      m_dtms=new_m_dtms;
                      int new_m_dtm_offsets[] = new int[newlen];
                      System.arraycopy(m_dtm_offsets,0,new_m_dtm_offsets,0,oldlen);
                      m_dtm_offsets=new_m_dtm_offsets;
              }

  m_dtms[id] = dtm;
              m_dtm_offsets[id]=offset;
  dtm.documentRegistration();
              // The DTM should have been told who its manager was when we created it.
              // Do we need to allow for adopting DTMs _not_ created by this manager?
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:48,代码来源:DTMManagerDefault.java


示例20: getNodeName

import com.sun.org.apache.xml.internal.res.XMLErrorResources; //导入依赖的package包/类
/**
 * Unimplemented. See org.w3c.dom.Node
 *
 * @return null
 */
public String getNodeName()
{

  error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);  //"getNodeName not supported!");

  return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:UnImplNode.java



注:本文中的com.sun.org.apache.xml.internal.res.XMLErrorResources类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NSRange类代码示例发布时间:2022-05-23
下一篇:
Java HashSP800DRBG类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap