当前位置: 技术问答>java相关
关于处理文件的问题,请指点……
来源: 互联网 发布时间:2015-03-06
本文导语: 我开始做jsp没有多久,不知道jsp怎么处理类似于asp的FileSystemObject能实现的功能。还有,Global.jsp怎么用? | Vector vectorNewMsg = new Vector(); try { BufferedReader br = new BufferedReader( new FileReader( ...
我开始做jsp没有多久,不知道jsp怎么处理类似于asp的FileSystemObject能实现的功能。还有,Global.jsp怎么用?
|
Vector vectorNewMsg = new Vector();
try {
BufferedReader br = new BufferedReader( new FileReader( "e:xxxxxxx.txt" ) );
String input;
while ( (input=br.readLine()) != null ) {
vectorNewMsg.addElement( input );
}
br.close();
PrintWriter pw = new PrintWriter( new FileOutputStream( "e:guest.txt" ) );
pw.println("1");
pw.println("2");
pw.println("3");
pw.println("4");
pw.println("5");
for ( int i=0; i
try {
BufferedReader br = new BufferedReader( new FileReader( "e:xxxxxxx.txt" ) );
String input;
while ( (input=br.readLine()) != null ) {
vectorNewMsg.addElement( input );
}
br.close();
PrintWriter pw = new PrintWriter( new FileOutputStream( "e:guest.txt" ) );
pw.println("1");
pw.println("2");
pw.println("3");
pw.println("4");
pw.println("5");
for ( int i=0; i