@Test(expected = UnsupportedOperationException.class) public void shouldRejectSetBytes5() { unmodifiableBuffer(EMPTY_BUFFER).setBytes(0, (ByteBuffer) null); }
@Override public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { throw new ReadOnlyBufferException(); }
ReadOnlyByteBuf extends AbstractDerivedByteBuf { @Override public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { throw new ReadOnlyBufferException(); } }
ReadOnlyByteBuf extends AbstractDerivedByteBuf { @Override public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { throw new ReadOnlyBufferException(); } ReadOnlyByteBuf(ByteBuf buffer); }
ReadOnlyByteBuf extends AbstractDerivedByteBuf { @Override public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { throw new ReadOnlyBufferException(); } ReadOnlyByteBuf(ByteBuf buffer); @Override boolean isReadOnly(); @Override boolean isWritable(); @Override boolean isWritable(int numBytes); @Override int ensureWritable(int minWritableBytes, boolean force); @Override ByteBuf ensureWritable(int minWritableBytes); @Override ByteBuf unwrap(); @Override ByteBufAllocator alloc(); @Override @Deprecated ByteOrder order(); @Override boolean isDirect(); @Override boolean hasArray(); @Override byte[] array(); @Override int arrayOffset(); @Override boolean hasMemoryAddress(); @Override long memoryAddress(); @Override ByteBuf discardReadBytes(); @Override ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length); @Override ByteBuf setBytes(int index, byte[] src, int srcIndex, int length); @Override ByteBuf setBytes(int index, ByteBuffer src); @Override ByteBuf setByte(int index, int value); @Override ByteBuf setShort(int index, int value); @Override ByteBuf setShortLE(int index, int value); @Override ByteBuf setMedium(int index, int value); @Override ByteBuf setMediumLE(int index, int value); @Override ByteBuf setInt(int index, int value); @Override ByteBuf setIntLE(int index, int value); @Override ByteBuf setLong(int index, long value); @Override ByteBuf setLongLE(int index, long value); @Override int setBytes(int index, InputStream in, int length); @Override int setBytes(int index, ScatteringByteChannel in, int length); @Override int setBytes(int index, FileChannel in, long position, int length); @Override int getBytes(int index, GatheringByteChannel out, int length); @Override int getBytes(int index, FileChannel out, long position, int length); @Override ByteBuf getBytes(int index, OutputStream out, int length); @Override ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length); @Override ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length); @Override ByteBuf getBytes(int index, ByteBuffer dst); @Override ByteBuf duplicate(); @Override ByteBuf copy(int index, int length); @Override ByteBuf slice(int index, int length); @Override byte getByte(int index); @Override short getShort(int index); @Override short getShortLE(int index); @Override int getUnsignedMedium(int index); @Override int getUnsignedMediumLE(int index); @Override int getInt(int index); @Override int getIntLE(int index); @Override long getLong(int index); @Override long getLongLE(int index); @Override int nioBufferCount(); @Override ByteBuffer nioBuffer(int index, int length); @Override ByteBuffer[] nioBuffers(int index, int length); @Override int forEachByte(int index, int length, ByteProcessor processor); @Override int forEachByteDesc(int index, int length, ByteProcessor processor); @Override int capacity(); @Override ByteBuf capacity(int newCapacity); @Override ByteBuf asReadOnly(); }
ReadOnlyByteBuf extends AbstractDerivedByteBuf { @Override public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) { throw new ReadOnlyBufferException(); } ReadOnlyByteBuf(ByteBuf buffer); @Override boolean isReadOnly(); @Override boolean isWritable(); @Override boolean isWritable(int numBytes); @Override int ensureWritable(int minWritableBytes, boolean force); @Override ByteBuf ensureWritable(int minWritableBytes); @Override ByteBuf unwrap(); @Override ByteBufAllocator alloc(); @Override @Deprecated ByteOrder order(); @Override boolean isDirect(); @Override boolean hasArray(); @Override byte[] array(); @Override int arrayOffset(); @Override boolean hasMemoryAddress(); @Override long memoryAddress(); @Override ByteBuf discardReadBytes(); @Override ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length); @Override ByteBuf setBytes(int index, byte[] src, int srcIndex, int length); @Override ByteBuf setBytes(int index, ByteBuffer src); @Override ByteBuf setByte(int index, int value); @Override ByteBuf setShort(int index, int value); @Override ByteBuf setShortLE(int index, int value); @Override ByteBuf setMedium(int index, int value); @Override ByteBuf setMediumLE(int index, int value); @Override ByteBuf setInt(int index, int value); @Override ByteBuf setIntLE(int index, int value); @Override ByteBuf setLong(int index, long value); @Override ByteBuf setLongLE(int index, long value); @Override int setBytes(int index, InputStream in, int length); @Override int setBytes(int index, ScatteringByteChannel in, int length); @Override int setBytes(int index, FileChannel in, long position, int length); @Override int getBytes(int index, GatheringByteChannel out, int length); @Override int getBytes(int index, FileChannel out, long position, int length); @Override ByteBuf getBytes(int index, OutputStream out, int length); @Override ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length); @Override ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length); @Override ByteBuf getBytes(int index, ByteBuffer dst); @Override ByteBuf duplicate(); @Override ByteBuf copy(int index, int length); @Override ByteBuf slice(int index, int length); @Override byte getByte(int index); @Override short getShort(int index); @Override short getShortLE(int index); @Override int getUnsignedMedium(int index); @Override int getUnsignedMediumLE(int index); @Override int getInt(int index); @Override int getIntLE(int index); @Override long getLong(int index); @Override long getLongLE(int index); @Override int nioBufferCount(); @Override ByteBuffer nioBuffer(int index, int length); @Override ByteBuffer[] nioBuffers(int index, int length); @Override int forEachByte(int index, int length, ByteProcessor processor); @Override int forEachByteDesc(int index, int length, ByteProcessor processor); @Override int capacity(); @Override ByteBuf capacity(int newCapacity); @Override ByteBuf asReadOnly();  }