00001 00002 // Source File Name: ArrayIndexOutOfBoundsException.java 00003 00004 // package java.lang; 00005 00006 // Referenced classes of package java.lang: 00007 // IndexOutOfBoundsException, StringBuffer, String 00008 00009 #ifndef __ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP__ 00010 #define __ARRAY_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP__ 00011 00012 #include <j2k/Fred/String/String.hpp> 00013 #include <j2k/Fred/Lang/Error/IndexOutOfBoundsException.hpp> 00014 00015 class ArrayIndexOutOfBoundsException : public IndexOutOfBoundsException 00016 { 00017 public: 00018 ArrayIndexOutOfBoundsException() 00019 : IndexOutOfBoundsException() { } 00020 00021 ArrayIndexOutOfBoundsException(int i) { 00022 char* s = new char[80]; 00023 sprintf( s, "Array index out of range: %d", i ); 00024 00025 IndexOutOfBoundsException( new String( s ) ); 00026 } 00027 00028 ArrayIndexOutOfBoundsException(String* s) 00029 : IndexOutOfBoundsException( s ) { } 00030 }; 00031 00032 #endif