// Avoid CompositeByteArray index overflow.
if (Integer.MAX_VALUE - cumulation.endIndex() < input.length()) {
CompositeByteArray newCumulation = new CompositeByteArray();
for (ByteArray component: cumulation) {
newCumulation.addLast(component);
}
this.cumulation = cumulation = newCumulation;
}
cumulation.addLast(input);