우분투 14.04를 사용 중이고 FileInputStream
, FileOutputStream
, BufferedReader
및 BufferWriter
과 같은 문제가 발생했습니다. 내 프로젝트는 다음과 같습니다. 내가 다른 파일을 하나 개의 파일에서 데이터를 복사 할 때 문제 코드가있다 :우분투 14.04를 사용하면 fileinputstream, fileoutputstream에 큰 문제가 있습니까?
try{
File filename=new File(jttex1.getText());
File nfile=new File(jttex2.getText());
if(!filename.exists()){
p("file is not found");
return;
}
if(!nfile.exists()){
p("file is not found");
return;
}
FileInputStream vinput=new FileInputStream(filename);
FileOutputStream voutput=new FileOutputStream(nfile);
jsizee.setText("size"+vinput.available());
byte[] buffer=new byte [50];
int lenghtt=0;
while ((vinput.read(buffer)) > 0);{
voutput.write(buffer);
vinput.close();
voutput.close();
}
}catch(IOException ee){
System.err.println(ee.getMessage());
}
}
16,당신이 손상이 파일은 또 다른 문자 인코딩을 선택하고 시도 할 수 있습니다이 문서를 계속할 경우 열린 파일은 일부 잘못된 문자가 다시
/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/00/01,235
파일이 Null로 가득합니다. 또한 *에서 *를 (를) 읽고있는 곳을 지정하지 않아도됩니다. – Makoto
이 코드는 너무 이상합니다. 나는 할 수 없습니다. – Kayaman
내 코드 또는 우분투에서이 문제가 있는지 물어 본가요? – mizomizo