BufferOverflowException
109110111112113114115116
@Override public void put( byte b ) throws BufferOverflowException { if (nextPut >= size) throw new BufferOverflowException(); buffer[nextPut++] = b; }
8182838485868788899091
@Override public void put( byte b ) throws BufferOverflowException { if (isFull()) throw new BufferOverflowException(); length++; buf[nextPut++] = b; if (nextPut >= size) nextPut = 0;
11831184118511861187118811891190119111921193
int oldLimit = limit(); int end = position() + fieldSize; if (oldLimit < end) { throw new BufferOverflowException(); } if (val.length() == 0) { if (!utf16) { put((byte) 0x00);
130131132133134135136137138139140
{ return null; } else { throw new BufferOverflowException(); } } final ByteBuffer buffer = allocator.allocate( payload.length ); if ( buffer == null )
334335336337338339340341342343344
{ return null; } else { throw new BufferOverflowException(); } } final ByteBuffer buffer = allocator.allocate( size );
12801281128212831284128512861287128812891290
int oldLimit = limit(); int end = position() + fieldSize; if( oldLimit < end ) { throw new BufferOverflowException(); } if( val.length() == 0 ) { if( !utf16 )
112113114115116117118119
8485868788899091929394
201202203204205206207208209210
maxChunks = chunksPerPkt; } void writeData(byte[] inarray, int off, int len) { if ( dataPos + len > buf.length) { throw new BufferOverflowException(); } System.arraycopy(inarray, off, buf, dataPos, len); dataPos += len; }
209210211212213214215216217218
dataPos += len; } void writeChecksum(byte[] inarray, int off, int len) { if (checksumPos + len > dataStart) { throw new BufferOverflowException(); } System.arraycopy(inarray, off, buf, checksumPos, len); checksumPos += len; }