client_Hale
2018-10-25 57a8388fa0f81f34497cdc668ed17c2ea95b02a7
Project/js_sdk/src/main/java/com/secondworld/univeralsdk/FileUtil.java
@@ -104,6 +104,31 @@
        }).start();
    }
    public static void copy(Context context, String fileName)
    {
        String _originalPath = "android" + File.separator + fileName;
        String _destPath = context.getExternalFilesDir(
                "").getAbsolutePath() + File.separator + fileName;
        try
        {
            InputStream _is = context.getAssets().open(_originalPath);
            FileOutputStream _fos = new FileOutputStream(new File(_destPath));
            byte[] _buffer = new byte[1024];
            int _byteCount;
            while ((_byteCount = _is.read(_buffer)) != -1)
            {
                _fos.write(_buffer, 0, _byteCount);
            }
            _fos.flush();
            _is.close();
            _fos.close();
            LogUtil.i("FileUtil", "单独拷贝 => 文件: " + _originalPath + " 已拷贝至: " + _destPath);
        } catch (Exception e)
        {
            e.printStackTrace();
        }
    }
    public static void copy(Context context, String original, String dest)
    {
        try