+ -
当前位置:首页 → 问答吧 → 读档后如何传到method下修改数据...

读档后如何传到method下修改数据...

时间:2011-12-18

来源:互联网

这是用来读档的FileIn.java
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
package rgbway;
import java.util.*;
import java.io.*;
 
public class FileIn {
   public FileIn() {
     try      {
     FileInputStream Finput = new FileInputStream("colorChecker24-AdobeRGB_OK.txt");
     while (Finput.available() > 0) {
        Finput.read();
        RRR passfile = new RRR();//这里我不知道该如何让读取的txt数据进到RRR method....
        }
     Finput.close();
     }
     catch (IOException e) {
     e.printStackTrace();
     }
     }
   public static void main(String[] args) {
     FileIn fIn = new FileIn();
 
     }
 
}


这是RRR.java 用来set和get
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package rgbway;
 
public class RRR {
  public RGB(
      int no,String colorname,
      double x1,double y1,double Y1,
      double L1,double a1,double b1,
      int R1,int G1,int B1) {
    set.. ...
  }
}

这是我txt档的格式
0  Ali  0.2  0.3  90  90  0  0  200  200  200
大概十几行...

作者: Isisdl   发布时间: 2011-12-18

写一个RRR的建构子,传入参数是String

作者: peanut978   发布时间: 2011-12-18