SegmentChunk* ISegment::toChunk(size_t index, BaseRepresentation *ctxrep, HTTPConnectionManager *connManager) { SegmentChunk *chunk; try { chunk = getChunk(getUrlSegment().toString(index, ctxrep), connManager); if (!chunk) return NULL; } catch (int) { return NULL; }; chunk->setRepresentation(ctxrep); return chunk; }
SegmentChunk* ISegment::toChunk(size_t index, BaseRepresentation *ctxrep) { SegmentChunk *chunk; try { chunk = getChunk(getUrlSegment().toString(index, ctxrep)); if (!chunk) return NULL; } catch (int) { return NULL; } if(startByte != endByte) { chunk->setStartByte(startByte); chunk->setEndByte(endByte); } chunk->setRepresentation(ctxrep); return chunk; }