Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdataindexsizeerrreplacedataoffsetgreater Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| characterdataindexsizeerrreplacedataoffsetgreater (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

The "replaceData(offset,count,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the length of the string.

Retrieve the character data of the last child of the first employee and invoke its "replaceData(offset,count,arg) method with offset=40 and count=3 and arg="ABC". It should raise the desired exception since the offset is greater than the length of the string.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR'])

Definition at line 50 of file characterdataindexsizeerrreplacedataoffsetgreater.java.

## Constructor & Destructor Documentation

characterdataindexsizeerrreplacedataoffsetgreater::characterdataindexsizeerrreplacedataoffsetgreater | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 52 of file characterdataindexsizeerrreplacedataoffsetgreater.java.
    00053  {
    00054       super(factory);
    00055
    00056    }

## Member Function Documentation

String characterdataindexsizeerrreplacedataoffsetgreater::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 81 of file characterdataindexsizeerrreplacedataoffsetgreater.java.
    00081                                 {
    00082       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataindexsizeerrreplacedataoffsetgreater";
    00083    }

void characterdataindexsizeerrreplacedataoffsetgreater::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 84 of file characterdataindexsizeerrreplacedataoffsetgreater.java. References DOMTestCase::doMain().
    00084                                           {
    00085         DOMTestCase.doMain(characterdataindexsizeerrreplacedataoffsetgreater.class,args);
    00086    }

void characterdataindexsizeerrreplacedataoffsetgreater::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 58 of file characterdataindexsizeerrreplacedataoffsetgreater.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00058                                                     {
    00059       Document doc;
    00060       NodeList elementList;
    00061       Node nameNode;
    00062       CharacterData child;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("address");
    00065       nameNode = elementList.item(0);
    00066       child = (CharacterData)nameNode.getFirstChild();
    00067
    00068         {
    00069                 boolean success = false;
    00070                 try {
    00071                         child.deleteData(40,3);
    00072
    00073                 }
    00074                 catch(DOMException ex) {
    00075                         success = (ex.code == DOMException.INDEX_SIZE_ERR);
    00076                 }
    00077                 assertTrue("characterdataIndexSizeErrReplaceDataOffsetGreaterAssert",success);
    00078         }
    00079
    00080    }

The documentation for this class was generated from the following file:

- characterdataindexsizeerrreplacedataoffsetgreater.java