Bonjour ci dessus vous avez un fichier que je souhaite lire uniquement les informations en rouge. j' ai écri un code qui le parcours, mais comment spécificier que je veux lire uniquement les information en rouge.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 Problem: pl Rows: 7 Columns: 5 Non-zeros: 15 Status: OPTIMAL Objective: objFc = 0.5 (MAXimum) No. Row name St Activity Lower bound Upper bound Marginal ------ ------------ -- ------------- ------------- ------------- ------------- 1 objFc B 0.5 2 const0 NS 0 0 = 1 3 const1 NL 0 0 -0.5 4 const2 NL 0 0 -0.5 5 const3 NU -0.001 -0.001 < eps 6 const4 B -0.499 -0.001 7 const5 NS 1 1 = 0.5 No. Column name St Activity Lower bound Upper bound Marginal ------ ------------ -- ------------- ------------- ------------- ---------- 1 lambda B 0.5 0 2 w[1] B 0.5 0 3 w[3] B 0.001 0 4 w[2] B 0.499 0 5 z B 0.5 End of output
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public static void Read() { String filePath = "C:\\test.doc"; try { BufferedReader buff = new BufferedReader(new FileReader(filePath)); try { String line; while ((line = buff.readLine()) != null) { //System.out.println(line); // traitement des données en rouge } } finally { buff.close(); } } catch (IOException ioe) { System.out.println("Erreur --" + ioe.toString()); } }
Partager