Hey Everyone,
I am seeming to be in a spot of trouble.
I am using the following code to read a HTML page, loop through it line by line. problem is it is around 7300 lines and takes about 20 seconds to finish the loop.
I was wondering if anyone could help me with a way of speeding it up a little bit?
String urltext = "http://www.kriogenic.com/javadoc/org/rsbot/script/Methods.html";
URL url = new URL(urltext);
BufferedReader in = new BufferedReader(new InputStreamReader(url
.openStream()));
String inputLine = "";
String temp;
int i = 10;
while ((temp = in.readLine()) != null) {
inputLine += temp;
if(temp.contains("<!-- ============ METHOD DETAIL ========== -->")){
i = 0;
}
if(i == 0 && temp.contains(messages[2])){
int io = temp.indexOf(messages[2]);
String il = temp.substring(io, (temp.indexOf(")",io) + 1));
String link = urltext + "#" + il;
sendMessage(sender,link);
sendMessage(channel,"Took " + (System.currentTimeMillis() - mt) + " Milliseconds");
i = 10;
}
}
in.close();