00001 00002 // Source File Name: StringIndexOutOfBoundsException.java 00003 00004 // package java.lang; 00005 00006 // Referenced classes of package java.lang: 00007 // IndexOutOfBoundsException, StringBuffer, String 00008 00009 #ifndef __J2K__STRING_INDEX_OUT_OF_BOUNDS_EXCEPTION_HPP__ 00010 #define __J2K__STRING_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 StringIndexOutOfBoundsException : public IndexOutOfBoundsException 00016 { 00017 00018 StringIndexOutOfBoundsException() : IndexOutOfBoundsException() { } 00019 00020 StringIndexOutOfBoundsException(String* s) 00021 : IndexOutOfBoundsException( s ) { } 00022 00023 StringIndexOutOfBoundsException(int i) { 00024 char* s = new char[80]; 00025 sprintf( s, "String index out of range: %d" , i ); 00026 00027 IndexOutOfBoundsException( new String( s ) ); 00028 } 00029 }; 00030 00031 #endif