初来咋到,望关照 文件位置我知道,我用BufferedReader 不行,拷过来的是乱码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Lookhttp://community.csdn.net/Expert/topic/3171/3171740.xml?temp=3.437442E-02 import java.io.*;class copyFile{ public static void main(String args[]) throws IOException { int n; FileInputStream fin; FileOutputStream fout; try { try { fin = new FileInputStream(args[0]); } catch(FileNotFoundException e) { System.err.println(e); return; } try { fout = new FileOutputStream(args[1]); } catch(FileNotFoundException e) { System.err.println(e); return ; } } catch(ArrayInedxOutBoundsException e) { System.err.println(e); return ; } try { do { n = fin.read(); if( n != -1) fout.write(n); } while(n != -1); } catch(IOException e) { System.err.println(e); } fin.close(); fout.close(); } } FileInputStream FileOutputStream 是用http还是FTP?一般都是一些文件流的控制。 是用http还是FTP?一般都是一些文件流的控制。 有谁清楚JDBC驱动和数据库之间交互的细节吗 case语句后常量表达式的值为什么不能是实数?如1.1? 还是关于应用JAR的问题(基础强的人进,新手误拢)! 请问各位高手一个有关于输入输出的问题! has-a关系是什么意思 classpath 应该怎么设置?..........各位大虾帮帮忙。。谢谢 java中文问题:如何从中文编码得到中文? 菜鸟问题:怎样截取字符串? 高分请教! 100分请教java怎样播放rm文件 怎么得到一未知字串的字符编码??----- 谢谢 关于构造函数的问题~~ !
http://community.csdn.net/Expert/topic/3171/3171740.xml?temp=3.437442E-02
class copyFile
{
public static void main(String args[]) throws IOException
{
int n;
FileInputStream fin;
FileOutputStream fout;
try
{
try
{
fin = new FileInputStream(args[0]);
}
catch(FileNotFoundException e)
{
System.err.println(e);
return;
}
try
{
fout = new FileOutputStream(args[1]);
}
catch(FileNotFoundException e)
{
System.err.println(e);
return ;
}
}
catch(ArrayInedxOutBoundsException e)
{
System.err.println(e);
return ;
}
try
{
do
{
n = fin.read();
if( n != -1)
fout.write(n);
}
while(n != -1);
}
catch(IOException e)
{
System.err.println(e);
}
fin.close();
fout.close();
}
}
FileOutputStream