byte[] buffer = new byte[FSConstants.SVN_STREAM_CHUNK_SIZE];
    public long getFile(String path, long revision, Map properties, OutputStream contents) throws SVNException {        try {            openRepository();            if (!SVNRepository.isValidRevision(revision)) {                revision = FSReader.getYoungestRevision(myReposRootDir);            }            String repositoryPath = getRepositoryPath(path);            if(contents != null){                InputStream fileStream = null;                try{                    fileStream = FSReader.getFileContentsInputStream(FSRoot.createRevisionRoot(revision, null), repositoryPath, myRevNodesPool, myReposRootDir);                    /* Read and write chunks until we get a short read, indicating the                     * end of the stream.  (We can't get a short write without an                     * associated error.)                      */                    while(true){                        byte[] buffer = new byte[FSConstants.SVN_STREAM_CHUNK_SIZE];                        int length = fileStream.read(buffer);                        if(length > 0){                            contents.write(buffer, 0, length);                        }                        if(length != FSConstants.SVN_STREAM_CHUNK_SIZE){                            break;                        }                    }                }catch(IOException ioe){                    SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage());                    SVNErrorManager.error(err, ioe);                }finally{                    SVNFileUtil.closeFile(fileStream);                }            }            if (properties != null) {                properties.putAll(collectProperties(myRevNodesPool.getRevisionNode(revision, repositoryPath, myReposRootDir), myReposRootDir));            }            return revision;        } finally {            closeRepository();        }    }