APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.dv.util

public Class ByteListImpl

extends AbstractList<Byte>
implements ByteList
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xerces.internal.xs.datatypes.ByteList, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable
Known Direct Subclasses
com.sun.org.apache.xerces.internal.impl.dv.xs.Base64BinaryDV.XBase64, com.sun.org.apache.xerces.internal.impl.dv.xs.HexBinaryDV.XHex
Imports
com.sun.org.apache.xerces.internal.xs.XSException, com.sun.org.apache.xerces.internal.xs.datatypes.ByteList, java.util.AbstractList

Implementation of com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.
Author
Ankit Pasricha, IBM

Field Summary

Modifier and TypeField and Description
protected String
protected final byte[]
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
ByteListImpl(byte[] data)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if this list contains the byte item.
contains
(byte
byte whose presence in this list is to be tested.
item
)

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.contains.

Checks if the byte item is a member of this list.

public Byte
get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.

public int
public byte

Returns:

The byte at the indexth position in the ByteList.
item
(int
index into the collection.
index
)

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.item.

Returns the indexth item in the collection.

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.

public byte[]
toByteArray()

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.toByteArray.

Construct and return a byte array for bytes contained in this list.

Inherited from java.util.AbstractList:
addaddaddAllclearequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveRangesetsubList

Field Detail

canonicalback to summary
protected String canonical
databack to summary
protected final byte[] data

Constructor Detail

ByteListImplback to summary
public ByteListImpl(byte[] data)

Method Detail

containsback to summary
public boolean contains(byte item)

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.contains.

Checks if the byte item is a member of this list.

Parameters
item:byte

byte whose presence in this list is to be tested.

Returns:boolean

True if this list contains the byte item.

getback to summary
public Byte get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

getLengthback to summary
public int getLength()

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.getLength.

The number of bytes in the list. The range of valid child object indices is 0 to length-1 inclusive.

itemback to summary
public byte item(int index) throws XSException

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.item.

Returns the indexth item in the collection. The index starts at 0.

Parameters
index:int

index into the collection.

Returns:byte

The byte at the indexth position in the ByteList.

Exceptions
XSException:
INDEX_SIZE_ERR: if index is greater than or equal to the number of objects in the list.
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

toByteArrayback to summary
public byte[] toByteArray()

Implements com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.toByteArray.

Doc from com.sun.org.apache.xerces.internal.xs.datatypes.ByteList.toByteArray.

Construct and return a byte array for bytes contained in this list.