Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatareplacedataexceedslengthofarg Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| characterdatareplacedataexceedslengthofarg (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 replaces the characters starting at the specified offset with the specified string. Test the situation where the length of the arg string is greater than the specified offset.

Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=0 and count=4 and arg="260030". The method should replace characters one thru four with "260030". Note that the length of the specified string is greater that the specified offset.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB

Definition at line 50 of file characterdatareplacedataexceedslengthofarg.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 73 of file characterdatareplacedataexceedslengthofarg.java.
    00073                                 {
    00074       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatareplacedataexceedslengthofarg";
    00075    }

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

| Definition at line 76 of file characterdatareplacedataexceedslengthofarg.java. References DOMTestCase::doMain().
    00076                                           {
    00077         DOMTestCase.doMain(characterdatareplacedataexceedslengthofarg.class,args);
    00078    }

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

| Reimplemented from DOMTestCase. Definition at line 58 of file characterdatareplacedataexceedslengthofarg.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00058                                                     {
    00059       Document doc;
    00060       NodeList elementList;
    00061       Node nameNode;
    00062       CharacterData child;
    00063       String childData;
    00064       doc = load("staff");
    00065       elementList = doc.getElementsByTagName("address");
    00066       nameNode = elementList.item(0);
    00067       child = (CharacterData)nameNode.getFirstChild();
    00068       child.replaceData(0,4,"260030");
    00069       childData = child.getData();
    00070       assertEquals("characterdataReplaceDataExceedsLengthOfArgAssert","260030 North Ave. Dallas, Texas 98551",childData);
    00071
    00072    }

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

- characterdatareplacedataexceedslengthofarg.java