return null;
}
final StringBuilder value = new StringBuilder("bytes=");
for (int i = 0; i < ranges.size(); i++) {
Range range = ranges.get(i);
if (i > 0) {
value.append(", ");
}
if (range.getIndex() >= Range.INDEX_FIRST) {
value.append(range.getIndex());
value.append("-");
if (range.getSize() != Range.SIZE_MAX) {
value.append(range.getIndex() + range.getSize());
}
} else if (range.getIndex() == Range.INDEX_LAST) {
value.append("-");
if (range.getSize() != Range.SIZE_MAX) {
value.append(range.getSize());
}
}
}
return value.toString();