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