//从property文件中读取内容package odds;import java.io.*;public class ReaderTxt {public void rp(String filename)
{try {
InputStream is = new FileInputStream(filename);
DataInputStream in = new DataInputStream(is); while (in.available()!=0)
{System.out.println(in.readLine());
}
in.close();
}
catch (Exception ex)
{
ex.getMessage();
}
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ReaderTxt x = new ReaderTxt();
x.rp("d:\\odds/aa.txt");
}}
{try {
InputStream is = new FileInputStream(filename);
DataInputStream in = new DataInputStream(is); while (in.available()!=0)
{System.out.println(in.readLine());
}
in.close();
}
catch (Exception ex)
{
ex.getMessage();
}
} /**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ReaderTxt x = new ReaderTxt();
x.rp("d:\\odds/aa.txt");
}}
System.out.println(new String(in.readLine().getBytes(),"big5"));