List of utility methods to do RandomAccessFile Copy
void | copyFile(File from, File to) Copy a file from one place to another. RandomAccessFile randFrom = new RandomAccessFile(from, "r"); RandomAccessFile randTo = new RandomAccessFile(to, "rw"); appendFile(randTo, randFrom); randFrom.close(); randTo.close(); to.setLastModified(from.lastModified()); |
void | copyFile(File srcFile, File destFile) copies a single file. if (!srcFile.toString().equals(destFile.toString())) { if (!destFile.exists()) { RandomAccessFile src; RandomAccessFile dest; File destDir; byte[] buf = new byte[blockSize]; int bytesRead = 0; src = new RandomAccessFile(srcFile.getPath(), "r"); ... |
boolean | copyFile(String src, String dst) method int bufsize = 1024; try { RandomAccessFile srcFile = new RandomAccessFile(src, "r"); long len = srcFile.length(); if (len > 0x7fffffff) { return (false); int l = (int) len; ... |
boolean | copyFile(String src, String dst) { method int bufsize = 1024; try { RandomAccessFile srcFile = new RandomAccessFile(src, "r"); long len = srcFile.length(); if (len > 0x7fffffff) { return (false); int l = (int) len; ... |