ContentContextImpl contextImpl = (ContentContextImpl) context; // this has to be of this type, we gave it to the plugin
ContentServerService serverService = getContentServerService();
outputStream = remoteOutputStream(outputStream);
long count = 0;
if (resourceExists) {
count = serverService.downloadPackageBitsRangeGivenResource(contextImpl.getResourceId(), packageDetailsKey,
outputStream, startByte, endByte);
} else {
// TODO: Figure out how to support this; the APIs require the resource to get the bits
}
return count;