19f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson/* 29f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Licensed to the Apache Software Foundation (ASF) under one 39f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * or more contributor license agreements. See the NOTICE file 49f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * distributed with this work for additional information 59f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * regarding copyright ownership. The ASF licenses this file 69f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * to you under the Apache License, Version 2.0 (the "License"); 79f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * you may not use this file except in compliance with the License. 89f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * You may obtain a copy of the License at 99f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 109f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * http://www.apache.org/licenses/LICENSE-2.0 119f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 129f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Unless required by applicable law or agreed to in writing, software 139f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * distributed under the License is distributed on an "AS IS" BASIS, 149f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 159f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * See the License for the specific language governing permissions and 169f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * limitations under the License. 179f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 189f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson/* 199f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * $Id: XStringForChars.java 468655 2006-10-28 07:12:06Z minchau $ 209f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 219f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilsonpackage org.apache.xpath.objects; 229f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 239f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilsonimport org.apache.xalan.res.XSLMessages; 249f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilsonimport org.apache.xml.utils.FastStringBuffer; 259f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilsonimport org.apache.xpath.res.XPATHErrorResources; 269f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 279f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 289f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson/** 299f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * This class will wrap a FastStringBuffer and allow for 309f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 319f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilsonpublic class XStringForChars extends XString 329f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson{ 339f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson static final long serialVersionUID = -2235248887220850467L; 349f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** The start position in the fsb. */ 359f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson int m_start; 369f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 379f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** The length of the string. */ 389f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson int m_length; 399f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 409f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson protected String m_strCache = null; 419f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 429f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 439f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Construct a XNodeSet object. 449f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 459f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param val FastStringBuffer object this will wrap, must be non-null. 469f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param start The start position in the array. 479f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param length The number of characters to read from the array. 489f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 499f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public XStringForChars(char[] val, int start, int length) 509f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 519f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson super(val); 529f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson m_start = start; 539f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson m_length = length; 549f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson if(null == val) 559f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson throw new IllegalArgumentException( 569f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson XSLMessages.createXPATHMessage(XPATHErrorResources.ER_FASTSTRINGBUFFER_CANNOT_BE_NULL, null)); //"The FastStringBuffer argument can not be null!!"); 579f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 589f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 599f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 609f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 619f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Construct a XNodeSet object. 629f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 639f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param val String object this will wrap. 649f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 659f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson private XStringForChars(String val) 669f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 679f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson super(val); 689f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson throw new IllegalArgumentException( 699f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson XSLMessages.createXPATHMessage(XPATHErrorResources.ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING, null)); //"XStringForChars can not take a string for an argument!"); 709f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 719f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 729f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 739f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Cast result object to a string. 749f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 759f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return The string this wraps or the empty string if null 769f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 779f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public FastStringBuffer fsb() 789f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 799f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS, null)); //"fsb() not supported for XStringForChars!"); 809f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 819f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 829f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 839f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Cast result object to a string. 849f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 859f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return The string this wraps or the empty string if null 869f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 879f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb) 889f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 899f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson fsb.append((char[])m_obj, m_start, m_length); 909f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 919f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 929f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 939f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 949f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Tell if this object contains a java String object. 959f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 969f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return true if this XMLString can return a string without creating one. 979f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 989f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public boolean hasString() 999f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1009f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return (null != m_strCache); 1019f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1029f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1039f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1049f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1059f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Cast result object to a string. 1069f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1079f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return The string this wraps or the empty string if null 1089f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1099f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public String str() 1109f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1119f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson if(null == m_strCache) 1129f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson m_strCache = new String((char[])m_obj, m_start, m_length); 1139f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1149f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return m_strCache; 1159f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1169f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1179f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1189f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1199f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Since this object is incomplete without the length and the offset, we 1209f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * have to convert to a string when this function is called. 1219f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1229f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return The java String representation of this object. 1239f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1249f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public Object object() 1259f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1269f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return str(); 1279f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1289f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1299f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1309f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Directly call the 1319f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * characters method on the passed ContentHandler for the 1329f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * string-value. Multiple calls to the 1339f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * ContentHandler's characters methods may well occur for a single call to 1349f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * this method. 1359f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1369f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param ch A non-null reference to a ContentHandler. 1379f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1389f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @throws org.xml.sax.SAXException 1399f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1409f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch) 1419f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson throws org.xml.sax.SAXException 1429f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1439f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ch.characters((char[])m_obj, m_start, m_length); 1449f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1459f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1469f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1479f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Directly call the 1489f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * comment method on the passed LexicalHandler for the 1499f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * string-value. 1509f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1519f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param lh A non-null reference to a LexicalHandler. 1529f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1539f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @throws org.xml.sax.SAXException 1549f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1559f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public void dispatchAsComment(org.xml.sax.ext.LexicalHandler lh) 1569f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson throws org.xml.sax.SAXException 1579f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1589f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson lh.comment((char[])m_obj, m_start, m_length); 1599f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1609f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1619f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1629f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Returns the length of this string. 1639f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1649f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return the length of the sequence of characters represented by this 1659f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * object. 1669f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1679f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public int length() 1689f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1699f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return m_length; 1709f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1719f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1729f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1739f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Returns the character at the specified index. An index ranges 1749f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * from <code>0</code> to <code>length() - 1</code>. The first character 1759f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * of the sequence is at index <code>0</code>, the next at index 1769f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <code>1</code>, and so on, as for array indexing. 1779f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1789f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param index the index of the character. 1799f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @return the character at the specified index of this string. 1809f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * The first character is at index <code>0</code>. 1819f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @exception IndexOutOfBoundsException if the <code>index</code> 1829f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * argument is negative or not less than the length of this 1839f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * string. 1849f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 1859f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public char charAt(int index) 1869f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 1879f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return ((char[])m_obj)[index+m_start]; 1889f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 1899f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 1909f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson /** 1919f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Copies characters from this string into the destination character 1929f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * array. 1939f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 1949f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param srcBegin index of the first character in the string 1959f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * to copy. 1969f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param srcEnd index after the last character in the string 1979f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * to copy. 1989f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param dst the destination array. 1999f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @param dstBegin the start offset in the destination array. 2009f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @exception IndexOutOfBoundsException If any of the following 2019f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * is true: 2029f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <ul><li><code>srcBegin</code> is negative. 2039f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <li><code>srcBegin</code> is greater than <code>srcEnd</code> 2049f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <li><code>srcEnd</code> is greater than the length of this 2059f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * string 2069f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <li><code>dstBegin</code> is negative 2079f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <li><code>dstBegin+(srcEnd-srcBegin)</code> is larger than 2089f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * <code>dst.length</code></ul> 2099f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * @exception NullPointerException if <code>dst</code> is <code>null</code> 2109f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson */ 2119f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson public void getChars(int srcBegin, int srcEnd, char dst[], int dstBegin) 2129f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson { 2139f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson System.arraycopy((char[])m_obj, m_start+srcBegin, dst, dstBegin, srcEnd); 2149f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson } 2159f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 2169f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson} 217