1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
public class Interpretation {
Client c;
Fenetre f;
public Interpretation(Client c, Fenetre f){
this.c = c;
}
public String inLine(String host, int port) throws IOException{
String[] s = new String[2];
s = c.getHeadBodyHTML(host, port);
String a = s[1];
char[] chara = new char[a.length()];
chara = a.toCharArray();int manapaka = 0;
int tapaka = 0;
String x = "";
String y = "";
for(int i=0; i<a.length(); i++){
if(chara[i]=='<' && chara[i+1]=='b' && chara[i+2]=='r' && chara[i+3] == '>'){
couperdebut = i;
couperfin = i+3;
}
}
x = a.substring(0,couperdebut );
y = a.substring(couperfin+1);
String last = "";
last = last.concat(x).concat("\n").concat(y);
return last;
}
} |
Partager