@Override public ContentStream getContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length) { checkDocumentId(docId); // get the stream ContentStream contentStream = null; try { contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), docId.getId(), streamId, offset, length, null); } catch (CmisConstraintException e) { // no content stream return null; } catch (CmisObjectNotFoundException onfe) { removeObjectFromCache(docId.getId()); throw onfe; } return contentStream; }
@Override public ContentStream getContentStream(ObjectId docId, String streamId, BigInteger offset, BigInteger length) { checkDocumentId(docId); // get the stream ContentStream contentStream = null; try { contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), docId.getId(), streamId, offset, length, null); } catch (CmisConstraintException e) { // no content stream return null; } catch (CmisObjectNotFoundException onfe) { removeObjectFromCache(docId.getId()); throw onfe; } return contentStream; }
contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), objectId, streamId, offset, length, null); } catch (CmisConstraintException ce) { contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), getObjectIdByPath(path), streamId, offset, length, null);
contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), objectId, streamId, offset, length, null); } catch (CmisConstraintException ce) { contentStream = getBinding().getObjectService().getContentStream(getRepositoryId(), getObjectIdByPath(path), streamId, offset, length, null);
@Override public ContentStream getContentStream() { if (objectId == null || getStreamId() == null) { return null; } ContentStream contentStream; try { contentStream = session.getBinding().getObjectService() .getContentStream(session.getRepositoryInfo().getId(), objectId, getStreamId(), null, null, null); } catch (CmisConstraintException e) { // no content stream return null; } if (contentStream == null) { return null; } String filename = contentStream.getFileName(); if (filename == null) { filename = getTitle(); } BigInteger bigLength = contentStream.getBigLength(); if (bigLength == null) { bigLength = getBigLength(); } long length = bigLength == null ? -1 : bigLength.longValue(); return session.getObjectFactory().createContentStream(filename, length, contentStream.getMimeType(), contentStream.getStream()); }
@Override public ContentStream getContentStream() { if (objectId == null || getStreamId() == null) { return null; } ContentStream contentStream; try { contentStream = session.getBinding().getObjectService() .getContentStream(session.getRepositoryInfo().getId(), objectId, getStreamId(), null, null, null); } catch (CmisConstraintException e) { // no content stream return null; } if (contentStream == null) { return null; } String filename = contentStream.getFileName(); if (filename == null) { filename = getTitle(); } BigInteger bigLength = contentStream.getBigLength(); if (bigLength == null) { bigLength = getBigLength(); } long length = bigLength == null ? -1 : bigLength.longValue(); return session.getObjectFactory().createContentStream(filename, length, contentStream.getMimeType(), contentStream.getStream()); }