code: public void copyFile(DocFile fromFile) throws DocFileIOException {
          try (OutputStream output = openOutputStream()) {
              try (InputStream input = fromFile.openInputStream()) {
                  byte[] bytearr = new byte[1024];
                  int len;
                  while ((len = read(fromFile, input, bytearr)) != -1) {
                      write(this, output, bytearr, len);
                  }
              } catch (IOException e) {
                  throw new DocFileIOException(fromFile, DocFileIOException.Mode.READ, e);
              }
          } catch (IOException e) {
              throw new DocFileIOException(this, DocFileIOException.Mode.WRITE, e);
          }
      }
docs: Copy the contents of another file directly to this file.
  
  @param fromFile the file to be copied
  @throws DocFileIOException if there is a problem file copying the file