BufferOverflowException
271272273274275276277278279280281
MalformedInputException, CharacterCodingException { switch (this.type) { case TYPE_UNDERFLOW: throw new BufferUnderflowException(); case TYPE_OVERFLOW: throw new BufferOverflowException(); case TYPE_UNMAPPABLE_CHAR: throw new UnmappableCharacterException(this.length); case TYPE_MALFORMED_INPUT: throw new MalformedInputException(this.length); default:
13051306130713081309131013111312131313141315
int oldLimit = limit(); int end = position() + fieldSize; if (oldLimit < end) { throw new BufferOverflowException(); } if (val.length() == 0) { if (!utf16) { put((byte) 0x00);
2143214421452146214721482149215021512152
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; }
2151215221532154215521562157215821592160
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; }
1802180318041805180618071808180918101811
dataPos = dataStart; } 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; }
1810181118121813181418151816181718181819
2063206420652066206720682069207020712072
2071207220732074207520762077207820792080
187188189190191192193194195196
protected final int putIndex(int len) { checkReleased(); checkReadonly(); if (limit - position < len) throw new BufferOverflowException(); int p = position + offset; position += len; return p; }
825826827828829830831832833834835
resize(); spaceLeft = spaceLeft(); } if(!blockingWrite && spaceLeft < len) throw new BufferOverflowException(); int realLen = Math.min(len, spaceLeft); int firstLen = Math.min(realLen, buffer.length - writePosition); int secondLen = Math.min(realLen - firstLen, buffer.length - markPosition - 1); int written = firstLen + secondLen;