/** * Make a <code>ByteArray</code> available for access at the end of this object. * * @param ba The ByteArray to append */ public final void append(ByteArray ba) { cba.addLast(ba); }
/** * Make a <code>ByteArray</code> available for access at the end of this object. */ public final void append( ByteArray ba ) { cba.addLast( ba ); }
/** * Make a <code>ByteArray</code> available for access at the end of this object. * * @param ba The ByteArray to append */ public final void append(ByteArray ba) { cba.addLast(ba); }
/** * {@inheritDoc} */ @Override public void expand(CompositeByteArray cba, int minSize) { int remaining = minSize; while (remaining > 0) { ByteArray component = baf.create(newComponentSize); cba.addLast(component); remaining -= newComponentSize; } }
public void expand( CompositeByteArray cba, int minSize ) { int remaining = minSize; while ( remaining > 0 ) { ByteArray component = baf.create( newComponentSize ); cba.addLast( component ); remaining -= newComponentSize; } }
/** * {@inheritDoc} */ @Override public void expand(CompositeByteArray cba, int minSize) { int remaining = minSize; while (remaining > 0) { ByteArray component = baf.create(newComponentSize); cba.addLast(component); remaining -= newComponentSize; } }
/** * {@inheritDoc} */ @Override public ByteArray slice(int length) { CompositeByteArray slice = new CompositeByteArray(byteArrayFactory); int remaining = length; while (remaining > 0) { prepareForAccess(remaining); int componentSliceSize = Math.min(remaining, componentCursor.getRemaining()); ByteArray componentSlice = componentCursor.slice(componentSliceSize); slice.addLast(componentSlice); index += componentSliceSize; remaining -= componentSliceSize; } return slice; }
/** * @inheritDoc */ public ByteArray slice( int length ) { CompositeByteArray slice = new CompositeByteArray( byteArrayFactory ); int remaining = length; while ( remaining > 0 ) { prepareForAccess( remaining ); int componentSliceSize = Math.min( remaining, componentCursor.getRemaining() ); ByteArray componentSlice = componentCursor.slice( componentSliceSize ); slice.addLast( componentSlice ); index += componentSliceSize; remaining -= componentSliceSize; } return slice; }
/** * {@inheritDoc} */ @Override public ByteArray slice(int length) { CompositeByteArray slice = new CompositeByteArray(byteArrayFactory); int remaining = length; while (remaining > 0) { prepareForAccess(remaining); int componentSliceSize = Math.min(remaining, componentCursor.getRemaining()); ByteArray componentSlice = componentCursor.slice(componentSliceSize); slice.addLast(componentSlice); index += componentSliceSize; remaining -= componentSliceSize; } return slice; }