package org.tizen.emulator.manager.vms.helper;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.net.ConnectException;
import java.net.Inet6Address;
return loaclIPAddress;
}
+ public static void FileCopy(File source, File dest) throws IOException {
+
+ FileInputStream inputStream = null;
+ FileOutputStream outputStream = null;
+ BufferedInputStream bin = null;
+ BufferedOutputStream bout = null;
+
+ try {
+ inputStream = new FileInputStream(source);
+ outputStream = new FileOutputStream(dest);
+
+ bin = new BufferedInputStream(inputStream);
+ bout = new BufferedOutputStream(outputStream);
+
+ int bytesRead = 0;
+ byte[] buffer = new byte[1024];
+ while ((bytesRead = bin.read(buffer, 0, 1024)) != -1) {
+ bout.write(buffer, 0, bytesRead);
+ }
+
+ } catch (IOException e) {
+ throw e;
+
+ } finally {
+ if (bout != null) {
+ bout.close();
+ }
+ if (bin != null) {
+ bin.close();
+ }
+ if (outputStream != null) {
+ outputStream.close();
+ }
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ }
+
+ }
+
}