List of usage examples for java.lang ArrayIndexOutOfBoundsException ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException()
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public QName getAttributeName(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public String getAttributeLocalName(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public String getAttributePrefix(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public String getAttributeNamespace(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:net.sourceforge.processdash.data.util.ResultSet.java
/** Resort the result set by the data in the specified column. * @throws ArrayIndexOutOfBoundsException unless 1 <= col <= numCols(). * WARNING: do not use this routine on a transposed result set which * uses row formats. The mapping of format to row will not be preserved. *//*from w w w.j av a 2s . c om*/ public void sortBy(int col, boolean descending) { if (col < 1 || col > numCols()) throw new ArrayIndexOutOfBoundsException(); Arrays.sort(data, 1, numRows() + 1, new RowComparator(col, descending)); }
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public String getAttributeType(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:org.apache.axis2.format.WrappedTextNodeStreamReader.java
public String getAttributeValue(int index) { checkStartElement(); throw new ArrayIndexOutOfBoundsException(); }
From source file:org.photovault.folder.PhotoFolder.java
/** Returns s subfolder with given order number. TODO: This is awfully inefficient but {@link PhotoFolderTreeModel} needs random access to this collection/*from ww w .j a v a 2s.c o m*/ */ public PhotoFolder getSubfolder(int num) { if (subfolders == null || num >= subfolders.size()) { throw new ArrayIndexOutOfBoundsException(); } // return subfolders.toArray(new PhotoFolder[subfolders.size()])[num]; }
From source file:IOUtilities.java
/** * Compares the 2 given sub arrays. Returns true if they are equal, false * otherwise./*w ww . j a v a 2s . c om*/ * * @throws ArrayIndexOutOfBounds if * <UL> * <LI> <code>offset1</code> or <code>offset2</code> are negative. * <LI> length is negative. * <LI> <code>offset1+length</code> is bigger than <code>arr1.length</code> * <LI> <code>offset2+length</code> is bigger than <code>arr2.length</code> * </UL> */ public static boolean equal(byte[] arr1, int offset1, byte[] arr2, int offset2, int length) { if ((offset1 < 0) || (offset2 < 0) || (length < 0) || (offset1 + length > arr1.length) || (offset2 + length > arr2.length)) throw new ArrayIndexOutOfBoundsException(); for (int i = 0; i < length; i++) { if (arr1[offset1 + i] != arr2[offset2 + i]) return false; } return true; }
From source file:net.sourceforge.processdash.data.util.ResultSet.java
/** Remove a row from the data set. * @param row The row to remove/*from www . j a v a2 s.c o m*/ */ public void removeRow(int row) { if (row < 1 || row > numRows()) throw new ArrayIndexOutOfBoundsException(); List newData = new ArrayList(Arrays.asList(data)); newData.remove(row); data = (Object[][]) newData.toArray(new Object[numRows()][0]); }