migrate more stuff to wala.util
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4040 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
5bd9c18b20
commit
129ce380a4
|
@ -53,9 +53,7 @@ Export-Package: .,
|
|||
com.ibm.wala.util,
|
||||
com.ibm.wala.util.bytecode,
|
||||
com.ibm.wala.util.config,
|
||||
com.ibm.wala.util.heapTrace,
|
||||
com.ibm.wala.util.io,
|
||||
com.ibm.wala.util.perf,
|
||||
com.ibm.wala.util.ref,
|
||||
com.ibm.wala.util.scope,
|
||||
com.ibm.wala.util.shrike,
|
||||
|
|
|
@ -15,7 +15,10 @@ Export-Package: com.ibm.wala.dataflow.graph,
|
|||
com.ibm.wala.util.graph.impl,
|
||||
com.ibm.wala.util.graph.labeled,
|
||||
com.ibm.wala.util.graph.traverse,
|
||||
com.ibm.wala.util.heapTrace,
|
||||
com.ibm.wala.util.intset,
|
||||
com.ibm.wala.util.io,
|
||||
com.ibm.wala.util.math,
|
||||
com.ibm.wala.util.perf,
|
||||
com.ibm.wala.util.processes,
|
||||
com.ibm.wala.util.tables
|
||||
|
|
|
@ -25,7 +25,6 @@ import java.util.Iterator;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import com.ibm.wala.util.collections.HashSetFactory;
|
||||
import com.ibm.wala.util.warnings.WalaException;
|
||||
|
||||
/**
|
||||
* Simple utilities for accessing files.
|
||||
|
@ -67,7 +66,7 @@ public class FileUtil {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static void copy(String srcFileName, String destFileName) throws WalaException {
|
||||
public static void copy(String srcFileName, String destFileName) throws IOException {
|
||||
if (srcFileName == null) {
|
||||
throw new IllegalArgumentException("srcFileName is null");
|
||||
}
|
||||
|
@ -82,12 +81,6 @@ public class FileUtil {
|
|||
long n = src.size();
|
||||
MappedByteBuffer buf = src.map(FileChannel.MapMode.READ_ONLY, 0, n);
|
||||
dest.write(buf);
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
throw new WalaException("Failed to copy " + srcFileName + " to " + destFileName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw new WalaException("Failed to copy " + srcFileName + " to " + destFileName);
|
||||
} finally {
|
||||
if (dest != null) {
|
||||
try {
|
Loading…
Reference in New Issue