View Javadoc
1   /*
2    * Copyright 2016 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  package io.netty.buffer;
17  
18  import io.netty.util.ByteProcessor;
19  
20  import java.io.IOException;
21  import java.io.InputStream;
22  import java.io.OutputStream;
23  import java.nio.ByteBuffer;
24  import java.nio.ByteOrder;
25  import java.nio.channels.FileChannel;
26  import java.nio.channels.GatheringByteChannel;
27  import java.nio.channels.ScatteringByteChannel;
28  import java.nio.charset.Charset;
29  import java.util.Iterator;
30  import java.util.List;
31  
32  class WrappedCompositeByteBuf extends CompositeByteBuf {
33  
34      private final CompositeByteBuf wrapped;
35  
36      WrappedCompositeByteBuf(CompositeByteBuf wrapped) {
37          super(wrapped.alloc());
38          this.wrapped = wrapped;
39      }
40  
41      @Override
42      public boolean release() {
43          return wrapped.release();
44      }
45  
46      @Override
47      public boolean release(int decrement) {
48          return wrapped.release(decrement);
49      }
50  
51      @Override
52      public final int maxCapacity() {
53          return wrapped.maxCapacity();
54      }
55  
56      @Override
57      public final int readerIndex() {
58          return wrapped.readerIndex();
59      }
60  
61      @Override
62      public final int writerIndex() {
63          return wrapped.writerIndex();
64      }
65  
66      @Override
67      public final boolean isReadable() {
68          return wrapped.isReadable();
69      }
70  
71      @Override
72      public final boolean isReadable(int numBytes) {
73          return wrapped.isReadable(numBytes);
74      }
75  
76      @Override
77      public final boolean isWritable() {
78          return wrapped.isWritable();
79      }
80  
81      @Override
82      public final boolean isWritable(int numBytes) {
83          return wrapped.isWritable(numBytes);
84      }
85  
86      @Override
87      public final int readableBytes() {
88          return wrapped.readableBytes();
89      }
90  
91      @Override
92      public final int writableBytes() {
93          return wrapped.writableBytes();
94      }
95  
96      @Override
97      public final int maxWritableBytes() {
98          return wrapped.maxWritableBytes();
99      }
100 
101     @Override
102     public int ensureWritable(int minWritableBytes, boolean force) {
103         return wrapped.ensureWritable(minWritableBytes, force);
104     }
105 
106     @Override
107     public ByteBuf order(ByteOrder endianness) {
108         return wrapped.order(endianness);
109     }
110 
111     @Override
112     public boolean getBoolean(int index) {
113         return wrapped.getBoolean(index);
114     }
115 
116     @Override
117     public short getUnsignedByte(int index) {
118         return wrapped.getUnsignedByte(index);
119     }
120 
121     @Override
122     public short getShort(int index) {
123         return wrapped.getShort(index);
124     }
125 
126     @Override
127     public short getShortLE(int index) {
128         return wrapped.getShortLE(index);
129     }
130 
131     @Override
132     public int getUnsignedShort(int index) {
133         return wrapped.getUnsignedShort(index);
134     }
135 
136     @Override
137     public int getUnsignedShortLE(int index) {
138         return wrapped.getUnsignedShortLE(index);
139     }
140 
141     @Override
142     public int getUnsignedMedium(int index) {
143         return wrapped.getUnsignedMedium(index);
144     }
145 
146     @Override
147     public int getUnsignedMediumLE(int index) {
148         return wrapped.getUnsignedMediumLE(index);
149     }
150 
151     @Override
152     public int getMedium(int index) {
153         return wrapped.getMedium(index);
154     }
155 
156     @Override
157     public int getMediumLE(int index) {
158         return wrapped.getMediumLE(index);
159     }
160 
161     @Override
162     public int getInt(int index) {
163         return wrapped.getInt(index);
164     }
165 
166     @Override
167     public int getIntLE(int index) {
168         return wrapped.getIntLE(index);
169     }
170 
171     @Override
172     public long getUnsignedInt(int index) {
173         return wrapped.getUnsignedInt(index);
174     }
175 
176     @Override
177     public long getUnsignedIntLE(int index) {
178         return wrapped.getUnsignedIntLE(index);
179     }
180 
181     @Override
182     public long getLong(int index) {
183         return wrapped.getLong(index);
184     }
185 
186     @Override
187     public long getLongLE(int index) {
188         return wrapped.getLongLE(index);
189     }
190 
191     @Override
192     public char getChar(int index) {
193         return wrapped.getChar(index);
194     }
195 
196     @Override
197     public float getFloat(int index) {
198         return wrapped.getFloat(index);
199     }
200 
201     @Override
202     public double getDouble(int index) {
203         return wrapped.getDouble(index);
204     }
205 
206     @Override
207     public ByteBuf setShortLE(int index, int value) {
208         return wrapped.setShortLE(index, value);
209     }
210 
211     @Override
212     public ByteBuf setMediumLE(int index, int value) {
213         return wrapped.setMediumLE(index, value);
214     }
215 
216     @Override
217     public ByteBuf setIntLE(int index, int value) {
218         return wrapped.setIntLE(index, value);
219     }
220 
221     @Override
222     public ByteBuf setLongLE(int index, long value) {
223         return wrapped.setLongLE(index, value);
224     }
225 
226     @Override
227     public byte readByte() {
228         return wrapped.readByte();
229     }
230 
231     @Override
232     public boolean readBoolean() {
233         return wrapped.readBoolean();
234     }
235 
236     @Override
237     public short readUnsignedByte() {
238         return wrapped.readUnsignedByte();
239     }
240 
241     @Override
242     public short readShort() {
243         return wrapped.readShort();
244     }
245 
246     @Override
247     public short readShortLE() {
248         return wrapped.readShortLE();
249     }
250 
251     @Override
252     public int readUnsignedShort() {
253         return wrapped.readUnsignedShort();
254     }
255 
256     @Override
257     public int readUnsignedShortLE() {
258         return wrapped.readUnsignedShortLE();
259     }
260 
261     @Override
262     public int readMedium() {
263         return wrapped.readMedium();
264     }
265 
266     @Override
267     public int readMediumLE() {
268         return wrapped.readMediumLE();
269     }
270 
271     @Override
272     public int readUnsignedMedium() {
273         return wrapped.readUnsignedMedium();
274     }
275 
276     @Override
277     public int readUnsignedMediumLE() {
278         return wrapped.readUnsignedMediumLE();
279     }
280 
281     @Override
282     public int readInt() {
283         return wrapped.readInt();
284     }
285 
286     @Override
287     public int readIntLE() {
288         return wrapped.readIntLE();
289     }
290 
291     @Override
292     public long readUnsignedInt() {
293         return wrapped.readUnsignedInt();
294     }
295 
296     @Override
297     public long readUnsignedIntLE() {
298         return wrapped.readUnsignedIntLE();
299     }
300 
301     @Override
302     public long readLong() {
303         return wrapped.readLong();
304     }
305 
306     @Override
307     public long readLongLE() {
308         return wrapped.readLongLE();
309     }
310 
311     @Override
312     public char readChar() {
313         return wrapped.readChar();
314     }
315 
316     @Override
317     public float readFloat() {
318         return wrapped.readFloat();
319     }
320 
321     @Override
322     public double readDouble() {
323         return wrapped.readDouble();
324     }
325 
326     @Override
327     public ByteBuf readBytes(int length) {
328         return wrapped.readBytes(length);
329     }
330 
331     @Override
332     public ByteBuf slice() {
333         return wrapped.slice();
334     }
335 
336     @Override
337     public ByteBuf retainedSlice() {
338         return wrapped.retainedSlice();
339     }
340 
341     @Override
342     public ByteBuf slice(int index, int length) {
343         return wrapped.slice(index, length);
344     }
345 
346     @Override
347     public ByteBuf retainedSlice(int index, int length) {
348         return wrapped.retainedSlice(index, length);
349     }
350 
351     @Override
352     public ByteBuffer nioBuffer() {
353         return wrapped.nioBuffer();
354     }
355 
356     @Override
357     public String toString(Charset charset) {
358         return wrapped.toString(charset);
359     }
360 
361     @Override
362     public String toString(int index, int length, Charset charset) {
363         return wrapped.toString(index, length, charset);
364     }
365 
366     @Override
367     public int indexOf(int fromIndex, int toIndex, byte value) {
368         return wrapped.indexOf(fromIndex, toIndex, value);
369     }
370 
371     @Override
372     public int bytesBefore(byte value) {
373         return wrapped.bytesBefore(value);
374     }
375 
376     @Override
377     public int bytesBefore(int length, byte value) {
378         return wrapped.bytesBefore(length, value);
379     }
380 
381     @Override
382     public int bytesBefore(int index, int length, byte value) {
383         return wrapped.bytesBefore(index, length, value);
384     }
385 
386     @Override
387     public int forEachByte(ByteProcessor processor) {
388         return wrapped.forEachByte(processor);
389     }
390 
391     @Override
392     public int forEachByte(int index, int length, ByteProcessor processor) {
393         return wrapped.forEachByte(index, length, processor);
394     }
395 
396     @Override
397     public int forEachByteDesc(ByteProcessor processor) {
398         return wrapped.forEachByteDesc(processor);
399     }
400 
401     @Override
402     public int forEachByteDesc(int index, int length, ByteProcessor processor) {
403         return wrapped.forEachByteDesc(index, length, processor);
404     }
405 
406     @Override
407     public final int hashCode() {
408         return wrapped.hashCode();
409     }
410 
411     @Override
412     public final boolean equals(Object o) {
413         return wrapped.equals(o);
414     }
415 
416     @Override
417     public final int compareTo(ByteBuf that) {
418         return wrapped.compareTo(that);
419     }
420 
421     @Override
422     public final int refCnt() {
423         return wrapped.refCnt();
424     }
425 
426     @Override
427     public ByteBuf duplicate() {
428         return wrapped.duplicate();
429     }
430 
431     @Override
432     public ByteBuf retainedDuplicate() {
433         return wrapped.retainedDuplicate();
434     }
435 
436     @Override
437     public ByteBuf readSlice(int length) {
438         return wrapped.readSlice(length);
439     }
440 
441     @Override
442     public ByteBuf readRetainedSlice(int length) {
443         return wrapped.readRetainedSlice(length);
444     }
445 
446     @Override
447     public int readBytes(GatheringByteChannel out, int length) throws IOException {
448         return wrapped.readBytes(out, length);
449     }
450 
451     @Override
452     public ByteBuf writeShortLE(int value) {
453         return wrapped.writeShortLE(value);
454     }
455 
456     @Override
457     public ByteBuf writeMediumLE(int value) {
458         return wrapped.writeMediumLE(value);
459     }
460 
461     @Override
462     public ByteBuf writeIntLE(int value) {
463         return wrapped.writeIntLE(value);
464     }
465 
466     @Override
467     public ByteBuf writeLongLE(long value) {
468         return wrapped.writeLongLE(value);
469     }
470 
471     @Override
472     public int writeBytes(InputStream in, int length) throws IOException {
473         return wrapped.writeBytes(in, length);
474     }
475 
476     @Override
477     public int writeBytes(ScatteringByteChannel in, int length) throws IOException {
478         return wrapped.writeBytes(in, length);
479     }
480 
481     @Override
482     public ByteBuf copy() {
483         return wrapped.copy();
484     }
485 
486     @Override
487     public CompositeByteBuf addComponent(ByteBuf buffer) {
488         wrapped.addComponent(buffer);
489         return this;
490     }
491 
492     @Override
493     public CompositeByteBuf addComponents(ByteBuf... buffers) {
494         wrapped.addComponents(buffers);
495         return this;
496     }
497 
498     @Override
499     public CompositeByteBuf addComponents(Iterable<ByteBuf> buffers) {
500         wrapped.addComponents(buffers);
501         return this;
502     }
503 
504     @Override
505     public CompositeByteBuf addComponent(int cIndex, ByteBuf buffer) {
506         wrapped.addComponent(cIndex, buffer);
507         return this;
508     }
509 
510     @Override
511     public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers) {
512         wrapped.addComponents(cIndex, buffers);
513         return this;
514     }
515 
516     @Override
517     public CompositeByteBuf addComponents(int cIndex, Iterable<ByteBuf> buffers) {
518         wrapped.addComponents(cIndex, buffers);
519         return this;
520     }
521 
522     @Override
523     public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer) {
524         wrapped.addComponent(increaseWriterIndex, buffer);
525         return this;
526     }
527 
528     @Override
529     public CompositeByteBuf addComponents(boolean increaseWriterIndex, ByteBuf... buffers) {
530         wrapped.addComponents(increaseWriterIndex, buffers);
531         return this;
532     }
533 
534     @Override
535     public CompositeByteBuf addComponents(boolean increaseWriterIndex, Iterable<ByteBuf> buffers) {
536         wrapped.addComponents(increaseWriterIndex, buffers);
537         return this;
538     }
539 
540     @Override
541     public CompositeByteBuf addComponent(boolean increaseWriterIndex, int cIndex, ByteBuf buffer) {
542         wrapped.addComponent(increaseWriterIndex, cIndex, buffer);
543         return this;
544     }
545 
546     @Override
547     public CompositeByteBuf removeComponent(int cIndex) {
548         wrapped.removeComponent(cIndex);
549         return this;
550     }
551 
552     @Override
553     public CompositeByteBuf removeComponents(int cIndex, int numComponents) {
554         wrapped.removeComponents(cIndex, numComponents);
555         return this;
556     }
557 
558     @Override
559     public Iterator<ByteBuf> iterator() {
560         return wrapped.iterator();
561     }
562 
563     @Override
564     public List<ByteBuf> decompose(int offset, int length) {
565         return wrapped.decompose(offset, length);
566     }
567 
568     @Override
569     public final boolean isDirect() {
570         return wrapped.isDirect();
571     }
572 
573     @Override
574     public final boolean hasArray() {
575         return wrapped.hasArray();
576     }
577 
578     @Override
579     public final byte[] array() {
580         return wrapped.array();
581     }
582 
583     @Override
584     public final int arrayOffset() {
585         return wrapped.arrayOffset();
586     }
587 
588     @Override
589     public final boolean hasMemoryAddress() {
590         return wrapped.hasMemoryAddress();
591     }
592 
593     @Override
594     public final long memoryAddress() {
595         return wrapped.memoryAddress();
596     }
597 
598     @Override
599     public final int capacity() {
600         return wrapped.capacity();
601     }
602 
603     @Override
604     public CompositeByteBuf capacity(int newCapacity) {
605         wrapped.capacity(newCapacity);
606         return this;
607     }
608 
609     @Override
610     public final ByteBufAllocator alloc() {
611         return wrapped.alloc();
612     }
613 
614     @Override
615     public final ByteOrder order() {
616         return wrapped.order();
617     }
618 
619     @Override
620     public final int numComponents() {
621         return wrapped.numComponents();
622     }
623 
624     @Override
625     public final int maxNumComponents() {
626         return wrapped.maxNumComponents();
627     }
628 
629     @Override
630     public final int toComponentIndex(int offset) {
631         return wrapped.toComponentIndex(offset);
632     }
633 
634     @Override
635     public final int toByteIndex(int cIndex) {
636         return wrapped.toByteIndex(cIndex);
637     }
638 
639     @Override
640     public byte getByte(int index) {
641         return wrapped.getByte(index);
642     }
643 
644     @Override
645     protected final byte _getByte(int index) {
646         return wrapped._getByte(index);
647     }
648 
649     @Override
650     protected final short _getShort(int index) {
651         return wrapped._getShort(index);
652     }
653 
654     @Override
655     protected final short _getShortLE(int index) {
656         return wrapped._getShortLE(index);
657     }
658 
659     @Override
660     protected final int _getUnsignedMedium(int index) {
661         return wrapped._getUnsignedMedium(index);
662     }
663 
664     @Override
665     protected final int _getUnsignedMediumLE(int index) {
666         return wrapped._getUnsignedMediumLE(index);
667     }
668 
669     @Override
670     protected final int _getInt(int index) {
671         return wrapped._getInt(index);
672     }
673 
674     @Override
675     protected final int _getIntLE(int index) {
676         return wrapped._getIntLE(index);
677     }
678 
679     @Override
680     protected final long _getLong(int index) {
681         return wrapped._getLong(index);
682     }
683 
684     @Override
685     protected final long _getLongLE(int index) {
686         return wrapped._getLongLE(index);
687     }
688 
689     @Override
690     public CompositeByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
691         wrapped.getBytes(index, dst, dstIndex, length);
692         return this;
693     }
694 
695     @Override
696     public CompositeByteBuf getBytes(int index, ByteBuffer dst) {
697         wrapped.getBytes(index, dst);
698         return this;
699     }
700 
701     @Override
702     public CompositeByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) {
703         wrapped.getBytes(index, dst, dstIndex, length);
704         return this;
705     }
706 
707     @Override
708     public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
709         return wrapped.getBytes(index, out, length);
710     }
711 
712     @Override
713     public CompositeByteBuf getBytes(int index, OutputStream out, int length) throws IOException {
714         wrapped.getBytes(index, out, length);
715         return this;
716     }
717 
718     @Override
719     public CompositeByteBuf setByte(int index, int value) {
720         wrapped.setByte(index, value);
721         return this;
722     }
723 
724     @Override
725     protected final void _setByte(int index, int value) {
726         wrapped._setByte(index, value);
727     }
728 
729     @Override
730     public CompositeByteBuf setShort(int index, int value) {
731         wrapped.setShort(index, value);
732         return this;
733     }
734 
735     @Override
736     protected final void _setShort(int index, int value) {
737         wrapped._setShort(index, value);
738     }
739 
740     @Override
741     protected final void _setShortLE(int index, int value) {
742         wrapped._setShortLE(index, value);
743     }
744 
745     @Override
746     public CompositeByteBuf setMedium(int index, int value) {
747         wrapped.setMedium(index, value);
748         return this;
749     }
750 
751     @Override
752     protected final void _setMedium(int index, int value) {
753         wrapped._setMedium(index, value);
754     }
755 
756     @Override
757     protected final void _setMediumLE(int index, int value) {
758         wrapped._setMediumLE(index, value);
759     }
760 
761     @Override
762     public CompositeByteBuf setInt(int index, int value) {
763         wrapped.setInt(index, value);
764         return this;
765     }
766 
767     @Override
768     protected final void _setInt(int index, int value) {
769         wrapped._setInt(index, value);
770     }
771 
772     @Override
773     protected final void _setIntLE(int index, int value) {
774         wrapped._setIntLE(index, value);
775     }
776 
777     @Override
778     public CompositeByteBuf setLong(int index, long value) {
779         wrapped.setLong(index, value);
780         return this;
781     }
782 
783     @Override
784     protected final void _setLong(int index, long value) {
785         wrapped._setLong(index, value);
786     }
787 
788     @Override
789     protected final void _setLongLE(int index, long value) {
790         wrapped._setLongLE(index, value);
791     }
792 
793     @Override
794     public CompositeByteBuf setBytes(int index, byte[] src, int srcIndex, int length) {
795         wrapped.setBytes(index, src, srcIndex, length);
796         return this;
797     }
798 
799     @Override
800     public CompositeByteBuf setBytes(int index, ByteBuffer src) {
801         wrapped.setBytes(index, src);
802         return this;
803     }
804 
805     @Override
806     public CompositeByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) {
807         wrapped.setBytes(index, src, srcIndex, length);
808         return this;
809     }
810 
811     @Override
812     public int setBytes(int index, InputStream in, int length) throws IOException {
813         return wrapped.setBytes(index, in, length);
814     }
815 
816     @Override
817     public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
818         return wrapped.setBytes(index, in, length);
819     }
820 
821     @Override
822     public ByteBuf copy(int index, int length) {
823         return wrapped.copy(index, length);
824     }
825 
826     @Override
827     public final ByteBuf component(int cIndex) {
828         return wrapped.component(cIndex);
829     }
830 
831     @Override
832     public final ByteBuf componentAtOffset(int offset) {
833         return wrapped.componentAtOffset(offset);
834     }
835 
836     @Override
837     public final ByteBuf internalComponent(int cIndex) {
838         return wrapped.internalComponent(cIndex);
839     }
840 
841     @Override
842     public final ByteBuf internalComponentAtOffset(int offset) {
843         return wrapped.internalComponentAtOffset(offset);
844     }
845 
846     @Override
847     public int nioBufferCount() {
848         return wrapped.nioBufferCount();
849     }
850 
851     @Override
852     public ByteBuffer internalNioBuffer(int index, int length) {
853         return wrapped.internalNioBuffer(index, length);
854     }
855 
856     @Override
857     public ByteBuffer nioBuffer(int index, int length) {
858         return wrapped.nioBuffer(index, length);
859     }
860 
861     @Override
862     public ByteBuffer[] nioBuffers(int index, int length) {
863         return wrapped.nioBuffers(index, length);
864     }
865 
866     @Override
867     public CompositeByteBuf consolidate() {
868         wrapped.consolidate();
869         return this;
870     }
871 
872     @Override
873     public CompositeByteBuf consolidate(int cIndex, int numComponents) {
874         wrapped.consolidate(cIndex, numComponents);
875         return this;
876     }
877 
878     @Override
879     public CompositeByteBuf discardReadComponents() {
880         wrapped.discardReadComponents();
881         return this;
882     }
883 
884     @Override
885     public CompositeByteBuf discardReadBytes() {
886         wrapped.discardReadBytes();
887         return this;
888     }
889 
890     @Override
891     public final String toString() {
892         return wrapped.toString();
893     }
894 
895     @Override
896     public final CompositeByteBuf readerIndex(int readerIndex) {
897         wrapped.readerIndex(readerIndex);
898         return this;
899     }
900 
901     @Override
902     public final CompositeByteBuf writerIndex(int writerIndex) {
903         wrapped.writerIndex(writerIndex);
904         return this;
905     }
906 
907     @Override
908     public final CompositeByteBuf setIndex(int readerIndex, int writerIndex) {
909         wrapped.setIndex(readerIndex, writerIndex);
910         return this;
911     }
912 
913     @Override
914     public final CompositeByteBuf clear() {
915         wrapped.clear();
916         return this;
917     }
918 
919     @Override
920     public final CompositeByteBuf markReaderIndex() {
921         wrapped.markReaderIndex();
922         return this;
923     }
924 
925     @Override
926     public final CompositeByteBuf resetReaderIndex() {
927         wrapped.resetReaderIndex();
928         return this;
929     }
930 
931     @Override
932     public final CompositeByteBuf markWriterIndex() {
933         wrapped.markWriterIndex();
934         return this;
935     }
936 
937     @Override
938     public final CompositeByteBuf resetWriterIndex() {
939         wrapped.resetWriterIndex();
940         return this;
941     }
942 
943     @Override
944     public CompositeByteBuf ensureWritable(int minWritableBytes) {
945         wrapped.ensureWritable(minWritableBytes);
946         return this;
947     }
948 
949     @Override
950     public CompositeByteBuf getBytes(int index, ByteBuf dst) {
951         wrapped.getBytes(index, dst);
952         return this;
953     }
954 
955     @Override
956     public CompositeByteBuf getBytes(int index, ByteBuf dst, int length) {
957         wrapped.getBytes(index, dst, length);
958         return this;
959     }
960 
961     @Override
962     public CompositeByteBuf getBytes(int index, byte[] dst) {
963         wrapped.getBytes(index, dst);
964         return this;
965     }
966 
967     @Override
968     public CompositeByteBuf setBoolean(int index, boolean value) {
969         wrapped.setBoolean(index, value);
970         return this;
971     }
972 
973     @Override
974     public CompositeByteBuf setChar(int index, int value) {
975         wrapped.setChar(index, value);
976         return this;
977     }
978 
979     @Override
980     public CompositeByteBuf setFloat(int index, float value) {
981         wrapped.setFloat(index, value);
982         return this;
983     }
984 
985     @Override
986     public CompositeByteBuf setDouble(int index, double value) {
987         wrapped.setDouble(index, value);
988         return this;
989     }
990 
991     @Override
992     public CompositeByteBuf setBytes(int index, ByteBuf src) {
993         wrapped.setBytes(index, src);
994         return this;
995     }
996 
997     @Override
998     public CompositeByteBuf setBytes(int index, ByteBuf src, int length) {
999         wrapped.setBytes(index, src, length);
1000         return this;
1001     }
1002 
1003     @Override
1004     public CompositeByteBuf setBytes(int index, byte[] src) {
1005         wrapped.setBytes(index, src);
1006         return this;
1007     }
1008 
1009     @Override
1010     public CompositeByteBuf setZero(int index, int length) {
1011         wrapped.setZero(index, length);
1012         return this;
1013     }
1014 
1015     @Override
1016     public CompositeByteBuf readBytes(ByteBuf dst) {
1017         wrapped.readBytes(dst);
1018         return this;
1019     }
1020 
1021     @Override
1022     public CompositeByteBuf readBytes(ByteBuf dst, int length) {
1023         wrapped.readBytes(dst, length);
1024         return this;
1025     }
1026 
1027     @Override
1028     public CompositeByteBuf readBytes(ByteBuf dst, int dstIndex, int length) {
1029         wrapped.readBytes(dst, dstIndex, length);
1030         return this;
1031     }
1032 
1033     @Override
1034     public CompositeByteBuf readBytes(byte[] dst) {
1035         wrapped.readBytes(dst);
1036         return this;
1037     }
1038 
1039     @Override
1040     public CompositeByteBuf readBytes(byte[] dst, int dstIndex, int length) {
1041         wrapped.readBytes(dst, dstIndex, length);
1042         return this;
1043     }
1044 
1045     @Override
1046     public CompositeByteBuf readBytes(ByteBuffer dst) {
1047         wrapped.readBytes(dst);
1048         return this;
1049     }
1050 
1051     @Override
1052     public CompositeByteBuf readBytes(OutputStream out, int length) throws IOException {
1053         wrapped.readBytes(out, length);
1054         return this;
1055     }
1056 
1057     @Override
1058     public int getBytes(int index, FileChannel out, long position, int length) throws IOException {
1059         return wrapped.getBytes(index, out, position, length);
1060     }
1061 
1062     @Override
1063     public int setBytes(int index, FileChannel in, long position, int length) throws IOException {
1064         return wrapped.setBytes(index, in, position, length);
1065     }
1066 
1067     @Override
1068     public boolean isReadOnly() {
1069         return wrapped.isReadOnly();
1070     }
1071 
1072     @Override
1073     public ByteBuf asReadOnly() {
1074         return wrapped.asReadOnly();
1075     }
1076 
1077     @Override
1078     protected SwappedByteBuf newSwappedByteBuf() {
1079         return wrapped.newSwappedByteBuf();
1080     }
1081 
1082     @Override
1083     public CharSequence getCharSequence(int index, int length, Charset charset) {
1084         return wrapped.getCharSequence(index, length, charset);
1085     }
1086 
1087     @Override
1088     public CharSequence readCharSequence(int length, Charset charset) {
1089         return wrapped.readCharSequence(length, charset);
1090     }
1091 
1092     @Override
1093     public int setCharSequence(int index, CharSequence sequence, Charset charset) {
1094         return wrapped.setCharSequence(index, sequence, charset);
1095     }
1096 
1097     @Override
1098     public int readBytes(FileChannel out, long position, int length) throws IOException {
1099         return wrapped.readBytes(out, position, length);
1100     }
1101 
1102     @Override
1103     public int writeBytes(FileChannel in, long position, int length) throws IOException {
1104         return wrapped.writeBytes(in, position, length);
1105     }
1106 
1107     @Override
1108     public int writeCharSequence(CharSequence sequence, Charset charset) {
1109         return wrapped.writeCharSequence(sequence, charset);
1110     }
1111 
1112     @Override
1113     public CompositeByteBuf skipBytes(int length) {
1114         wrapped.skipBytes(length);
1115         return this;
1116     }
1117 
1118     @Override
1119     public CompositeByteBuf writeBoolean(boolean value) {
1120         wrapped.writeBoolean(value);
1121         return this;
1122     }
1123 
1124     @Override
1125     public CompositeByteBuf writeByte(int value) {
1126         wrapped.writeByte(value);
1127         return this;
1128     }
1129 
1130     @Override
1131     public CompositeByteBuf writeShort(int value) {
1132         wrapped.writeShort(value);
1133         return this;
1134     }
1135 
1136     @Override
1137     public CompositeByteBuf writeMedium(int value) {
1138         wrapped.writeMedium(value);
1139         return this;
1140     }
1141 
1142     @Override
1143     public CompositeByteBuf writeInt(int value) {
1144         wrapped.writeInt(value);
1145         return this;
1146     }
1147 
1148     @Override
1149     public CompositeByteBuf writeLong(long value) {
1150         wrapped.writeLong(value);
1151         return this;
1152     }
1153 
1154     @Override
1155     public CompositeByteBuf writeChar(int value) {
1156         wrapped.writeChar(value);
1157         return this;
1158     }
1159 
1160     @Override
1161     public CompositeByteBuf writeFloat(float value) {
1162         wrapped.writeFloat(value);
1163         return this;
1164     }
1165 
1166     @Override
1167     public CompositeByteBuf writeDouble(double value) {
1168         wrapped.writeDouble(value);
1169         return this;
1170     }
1171 
1172     @Override
1173     public CompositeByteBuf writeBytes(ByteBuf src) {
1174         wrapped.writeBytes(src);
1175         return this;
1176     }
1177 
1178     @Override
1179     public CompositeByteBuf writeBytes(ByteBuf src, int length) {
1180         wrapped.writeBytes(src, length);
1181         return this;
1182     }
1183 
1184     @Override
1185     public CompositeByteBuf writeBytes(ByteBuf src, int srcIndex, int length) {
1186         wrapped.writeBytes(src, srcIndex, length);
1187         return this;
1188     }
1189 
1190     @Override
1191     public CompositeByteBuf writeBytes(byte[] src) {
1192         wrapped.writeBytes(src);
1193         return this;
1194     }
1195 
1196     @Override
1197     public CompositeByteBuf writeBytes(byte[] src, int srcIndex, int length) {
1198         wrapped.writeBytes(src, srcIndex, length);
1199         return this;
1200     }
1201 
1202     @Override
1203     public CompositeByteBuf writeBytes(ByteBuffer src) {
1204         wrapped.writeBytes(src);
1205         return this;
1206     }
1207 
1208     @Override
1209     public CompositeByteBuf writeZero(int length) {
1210         wrapped.writeZero(length);
1211         return this;
1212     }
1213 
1214     @Override
1215     public CompositeByteBuf retain(int increment) {
1216         wrapped.retain(increment);
1217         return this;
1218     }
1219 
1220     @Override
1221     public CompositeByteBuf retain() {
1222         wrapped.retain();
1223         return this;
1224     }
1225 
1226     @Override
1227     public CompositeByteBuf touch() {
1228         wrapped.touch();
1229         return this;
1230     }
1231 
1232     @Override
1233     public CompositeByteBuf touch(Object hint) {
1234         wrapped.touch(hint);
1235         return this;
1236     }
1237 
1238     @Override
1239     public ByteBuffer[] nioBuffers() {
1240         return wrapped.nioBuffers();
1241     }
1242 
1243     @Override
1244     public CompositeByteBuf discardSomeReadBytes() {
1245         wrapped.discardSomeReadBytes();
1246         return this;
1247     }
1248 
1249     @Override
1250     public final void deallocate() {
1251         wrapped.deallocate();
1252     }
1253 
1254     @Override
1255     public final ByteBuf unwrap() {
1256         return wrapped;
1257     }
1258 }