FileInputStream, FileOutputStream
FileInputStream fi = new FileInputStream(new File("d:\\temp\\temp.xls"));
FileOutputStream fo = new FileOutputStream("d:\\temp\\temp2.xls");
int b;
while ((b = fi.read()) != -1) {
fo.write(b);
fo.flush();
}
fi.close();
fo.close();
FileInputStream fi = new FileInputStream(new File("d:\\temp\\temp.xls"));
FileOutputStream fo = new FileOutputStream("d:\\temp\\temp2.xls");
int b;
while ((b = fi.read()) != -1) {
fo.write(b);
fo.flush();
}
fi.close();
fo.close();
FileInputStream fi = new FileInputStream(new File("d:\\temp\\temp.xls")); FileOutputStream fo = new FileOutputStream("d:\\temp\\temp2.xls"); int b; while ((b = fi.read()) != -1) { fo.write(b); fo.flush(); } fi.close(); fo.close();
RandomAccessFile
public static void main(String[] args) throws IOException {
String s = "ILoveJava~";
String q = "Jabook!";
RandomAccessFile rf = new RandomAccessFile("RandomAccessFile.txt", "rw");
public static void main(String[] args) throws IOException {
String s = "ILoveJava~";
String q = "Jabook!";
RandomAccessFile rf = new RandomAccessFile("RandomAccessFile.txt", "rw");
public static void main(String[] args) throws IOException { String s = "ILoveJava~"; String q = "Jabook!"; RandomAccessFile rf = new RandomAccessFile("RandomAccessFile.txt", "rw");