Hi all , 

Recently, I have a requirement which will download multi files from the SVN
repository. But I don't want to use checkout, because the files may not very
much. The checkout is a waste of time. So only the files needed is
exported/catted. 


Concurrent is faster. But I don't know whether these method is thread safe?
Or could you give me any other advise?


Here is the code snippet. This method will be call in multi threads. 


 public void doCat(SVNURL sourceUrl, SVNRevision pegRevision, SVNRevision
revision, File target) throws SVNException, FileNotFoundException{
        SVNWCClient wcClient = _manager.getWCClient();
        FileOutputStream fos = null;
        try{
            fos = new FileOutputStream(target);
            LOG.debug(String.format("executing 'cat' for revision %d of url
%s pegged at revision %d", revision.getNumber(), sourceUrl,
pegRevision.getNumber()));
            wcClient.doGetFileContents(sourceUrl, pegRevision, revision,
true, fos);
        }
        finally{
            ScmiUtil.safeClose(fos);
        }
    }

-- 
View this message in context: 
http://old.nabble.com/Is-doExport-and-doCat-method-thread-safe--tp33037090p33037090.html
Sent from the SVNKit - Users mailing list archive at Nabble.com.

Reply via email to