code: public static boolean copy(File source, File dest) {
          BufferedInputStream bis = null;
          BufferedOutputStream bos = null;
          boolean result = true;
          try {
              bis = new BufferedInputStream(new FileInputStream(source));
              bos = new BufferedOutputStream(new FileOutputStream(dest, false));
  
              byte[] buf = new byte[1024];
              bis.read(buf);
  
              do {
                  bos.write(buf);
              } while (bis.read(buf) != -1);
          } catch (IOException e) {
              result = false;
          } finally {
              try {
                  if (bis != null) bis.close();
                  if (bos != null) bos.close();
              } catch (IOException e) {
                  result = false;
              }
          }
  
          return result;
      }
docs: copy file
  
  @param source source file
  @param dest   dest file
  @return true if success copied