mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
First part of ALF-16687 Update to CMIS 0.8
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43422 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1209,8 +1209,8 @@ public class CMISConnector implements ApplicationContextAware, ApplicationListen
|
||||
else
|
||||
{
|
||||
long off = (offset == null ? 0 : offset.longValue());
|
||||
long len = (length == null ? contentReader.getSize() : length.longValue()) - off;
|
||||
if (len > contentReader.getSize())
|
||||
long len = (length == null ? contentReader.getSize() : length.longValue());
|
||||
if (off + len > contentReader.getSize())
|
||||
{
|
||||
len = contentReader.getSize() - off;
|
||||
}
|
||||
|
@@ -65,6 +65,11 @@ public class RangeInputStream extends InputStream
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException
|
||||
{
|
||||
if(length - bytesRead == 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (len > length - bytesRead)
|
||||
{
|
||||
len = (int) (length - bytesRead);
|
||||
|
Reference in New Issue
Block a user