docs: public R download(OutputStream out) throws DbxException,  IOException {
          try {
              IOUtil.copyStreamToStream(getInputStream(), out);
          } catch (IOUtil.WriteException ex) {
              // write exceptions should be IOException
              throw ex.getCause();
          } catch (IOException ex) {
              // everything else is a Network I/O problem
              throw new NetworkIOException(ex);
          } finally {
              close();
          }
  
          return result;
      }