I keep getting Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 35018 and telling me that 35054 characters is to large even though I just recently checked how many charecters there are and its around 7000 I was wondering if somebody could help me with this. This is the code in question.
if (twojunglers[0].equals("hecarim")) {
if (twojunglers[1].equals("leesin")) {
String codeblock;
String codeblock1;
String codeblock2;
while ((codeblock = br.readLine()) != null) {
String makelinesintoone;
StringBuilder builder = new StringBuilder();
while ((makelinesintoone = br.readLine()) != null){
builder.append(makelinesintoone);
}
int hi = builder.indexOf("Red\">");
if (hi >= 0) {
codeblock1 = codeblock.substring(0, hi);
int cutstring_ = codeblock1.indexOf("Champion\">");
if (cutstring_ >= 0) {
codeblock2 = codeblock1.substring(0, cutstring_);
System.out.println(codeblock2);