Added a method to AVMService and its dependent services to get an InputStream

directly from a node descriptor.  It's a minor optimization for a few use
scenarios.  It's also convenient for accessing content of historical file
versions directly.  
Another CLT, to list the versions of a store.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-12-03 03:55:49 +00:00
parent b947cfc864
commit 03a93a3cf7
13 changed files with 163 additions and 16 deletions

View File

@@ -108,6 +108,21 @@ public class AVMServiceImpl implements AVMService
return fAVMRepository.getInputStream(version, path);
}
/**
* Get an InputStream from a descriptor.
* @param desc The descriptor.
* @return An InputStream.
* @throws AVMNotFoundException
*/
public InputStream getFileInputStream(AVMNodeDescriptor desc)
{
if (desc == null)
{
throw new AVMBadArgumentException("Illegal Null Argument.");
}
return fAVMRepository.getInputStream(desc);
}
/**
* Get an output stream to a file. Triggers versioning.
*/