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 31 32 33 34 35 36
| try {
int apresBOUNDARY = 0;
Scanner scanner = new Scanner(new File("RIGHT_CC.OVERLAY"));
while (scanner.hasNext()){
String st = scanner.useDelimiter("\n").next();
if(st.trim().equalsIgnoreCase("BOUNDARY")){
apresBOUNDARY = 1;
}
if(apresBOUNDARY == 1){
String[] split=st.split("\n");
for(int i=0;i<split.length;i++){
var=split[i];
if(var=="#"){
k=i;
}
}
boundry1=st.substring(0,k);
// System.out.print(boundry1);
boundry2=st.substring(k,st.length());
// System.out.println(boundry2);
}
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
System.out.println(e.toString());
} |
Partager