自己实现了一个方法,将绝对路径a下的文件的字节型内容写入绝对路径b下的文件中
public static void inputB(String a, String b){
FileInputStream fis = null;
FileOutputStream fos = null;
try {
fis = new FileInputStream(a);
fos = new FileOutputStream(b,true);
int code = fis.read();
while(code != -1){
fos.write(code);
code = fis.read();
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if(fis != null){
fis.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}