|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.ArrayList<java.lang.Object> redstone.xmlrpc.XmlRpcArray
public class XmlRpcArray
An Array represents an XML-RPC array in its Java form. Essentially, it's just a java.util.ArrayList with utility methods for extracting members of any of the data types supported by the XML-RPC library. The class does not introduce any new field members which makes it no more expensive than a regular ArrayList.
To extract nested values from the list, use the new simplified accessors which perform the casting for you:
boolean boolean = myList.getStruct( 0 ).getBoolean( "someBoolean" );
Constructor Summary | |
---|---|
XmlRpcArray()
|
Method Summary | |
---|---|
XmlRpcArray |
getArray(int index)
Returns the Array at the given index in the array. |
byte[] |
getBinary(int index)
Returns the byte[] at the given index in the array. |
java.io.InputStream |
getBinaryAsStream(int index)
Returns the byte[] with at the given index in the Array, as an input stream (currently, a java.io.ByteArrayInputStream). |
boolean |
getBoolean(int index)
Returns the boolean at the given index in the array. |
java.lang.Boolean |
getBooleanWrapper(int index)
Returns the Boolean wrapper at the given index in the array. |
java.util.Date |
getDate(int index)
Returns the Date at the given index in the array. |
double |
getDouble(int index)
Returns the Double at the given index in the array. |
java.lang.Double |
getDoubleWrapper(int index)
Returns the Double wrapper at the given index in the array. |
int |
getInteger(int index)
Returns the integer at the given index in the array. |
java.lang.Integer |
getIntegerWrapper(int index)
Returns the Integer wrapper at the given index in the array. |
java.lang.String |
getString(int index)
Returns the String at the given index in the array. |
XmlRpcStruct |
getStruct(int index)
Returns the Struct at the given index in the array. |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public XmlRpcArray()
Method Detail |
---|
public java.lang.String getString(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a String.public boolean getBoolean(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Boolean.public java.lang.Boolean getBooleanWrapper(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Boolean.public int getInteger(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not an Integer.public java.lang.Integer getIntegerWrapper(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Integer.public double getDouble(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Double.public java.lang.Double getDoubleWrapper(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Double.public XmlRpcArray getArray(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not an Array.public XmlRpcStruct getStruct(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Struct.public java.util.Date getDate(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a Date.public byte[] getBinary(int index)
index
- The index into the array to extract the value from.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a byte[].public java.io.InputStream getBinaryAsStream(int index)
key
- The key of the value to extract.
ArrayOutOfBoundsException
- if index > size() - 1.
java.lang.ClassCastException
- if the value at the given index is not a byte[].
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |