private void writeItem ( FakeEncodedItem item ) { int endPosition = dataPosition + item . sizeBytes ; if ( endPosition > data . length ) { // Parcel grows by 3/2 of the new size. setDataCapacityAtLeast ( endPosition * 3 / 2 ) ; } if ( endPosition > dataSize ) { failNextReadIfPastEnd = true ; dataSize = endPosition ; } Arrays . fill ( data , dataPosition , endPosition , item ) ; dataPosition = endPosition ; }
Writes an encoded item directly bypassing alignment and possibly repeating an item .