14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20 package com.sun.org.apache.xerces.internal.impl.dv.util;
21
22 import java.util.AbstractList;
23
24 import com.sun.org.apache.xerces.internal.xs.XSException;
25 import com.sun.org.apache.xerces.internal.xs.datatypes.ByteList;
26
27 /**
28 * Implementation of <code>com.sun.org.apache.xerces.internal.xs.datatypes.ByteList</code>.
29 *
30 * @xerces.internal
31 *
32 * @author Ankit Pasricha, IBM
33 *
34 * @version $Id: ByteListImpl.java,v 1.7 2010-11-01 04:39:46 joehw Exp $
35 */
36 public class ByteListImpl extends AbstractList implements ByteList {
37
38 // actually data stored in a byte array
39 protected final byte[] data;
40
41 // canonical representation of the data
42 protected String canonical;
43
44 public ByteListImpl(byte[] data) {
45 this.data = data;
46 }
47
48 /**
49 * The number of <code>byte</code>s in the list. The range of
50 * valid child object indices is 0 to <code>length-1</code> inclusive.
51 */
52 public int getLength() {
53 return data.length;
54 }
|
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20 package com.sun.org.apache.xerces.internal.impl.dv.util;
21
22 import java.util.AbstractList;
23
24 import com.sun.org.apache.xerces.internal.xs.XSException;
25 import com.sun.org.apache.xerces.internal.xs.datatypes.ByteList;
26
27 /**
28 * Implementation of <code>com.sun.org.apache.xerces.internal.xs.datatypes.ByteList</code>.
29 *
30 * @xerces.internal
31 *
32 * @author Ankit Pasricha, IBM
33 *
34 */
35 public class ByteListImpl extends AbstractList implements ByteList {
36
37 // actually data stored in a byte array
38 protected final byte[] data;
39
40 // canonical representation of the data
41 protected String canonical;
42
43 public ByteListImpl(byte[] data) {
44 this.data = data;
45 }
46
47 /**
48 * The number of <code>byte</code>s in the list. The range of
49 * valid child object indices is 0 to <code>length-1</code> inclusive.
50 */
51 public int getLength() {
52 return data.length;
53 }
|