查看本类的 API文档回源码主页即时通讯网 - 即时通讯开发者社区!
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 componentAtOffset(int offset) {
859         return wrapped.componentAtOffset(offset);
860     }
861 
862     @Override
863     public final ByteBuf internalComponent(int cIndex) {
864         return wrapped.internalComponent(cIndex);
865     }
866 
867     @Override
868     public final ByteBuf internalComponentAtOffset(int offset) {
869         return wrapped.internalComponentAtOffset(offset);
870     }
871 
872     @Override
873     public int nioBufferCount() {
874         return wrapped.nioBufferCount();
875     }
876 
877     @Override
878     public ByteBuffer internalNioBuffer(int index, int length) {
879         return wrapped.internalNioBuffer(index, length);
880     }
881 
882     @Override
883     public ByteBuffer nioBuffer(int index, int length) {
884         return wrapped.nioBuffer(index, length);
885     }
886 
887     @Override
888     public ByteBuffer[] nioBuffers(int index, int length) {
889         return wrapped.nioBuffers(index, length);
890     }
891 
892     @Override
893     public CompositeByteBuf consolidate() {
894         wrapped.consolidate();
895         return this;
896     }
897 
898     @Override
899     public CompositeByteBuf consolidate(int cIndex, int numComponents) {
900         wrapped.consolidate(cIndex, numComponents);
901         return this;
902     }
903 
904     @Override
905     public CompositeByteBuf discardReadComponents() {
906         wrapped.discardReadComponents();
907         return this;
908     }
909 
910     @Override
911     public CompositeByteBuf discardReadBytes() {
912         wrapped.discardReadBytes();
913         return this;
914     }
915 
916     @Override
917     public final String toString() {
918         return wrapped.toString();
919     }
920 
921     @Override
922     public final CompositeByteBuf readerIndex(int readerIndex) {
923         wrapped.readerIndex(readerIndex);
924         return this;
925     }
926 
927     @Override
928     public final CompositeByteBuf writerIndex(int writerIndex) {
929         wrapped.writerIndex(writerIndex);
930         return this;
931     }
932 
933     @Override
934     public final CompositeByteBuf setIndex(int readerIndex, int writerIndex) {
935         wrapped.setIndex(readerIndex, writerIndex);
936         return this;
937     }
938 
939     @Override
940     public final CompositeByteBuf clear() {
941         wrapped.clear();
942         return this;
943     }
944 
945     @Override
946     public final CompositeByteBuf markReaderIndex() {
947         wrapped.markReaderIndex();
948         return this;
949     }
950 
951     @Override
952     public final CompositeByteBuf resetReaderIndex() {
953         wrapped.resetReaderIndex();
954         return this;
955     }
956 
957     @Override
958     public final CompositeByteBuf markWriterIndex() {
959         wrapped.markWriterIndex();
960         return this;
961     }
962 
963     @Override
964     public final CompositeByteBuf resetWriterIndex() {
965         wrapped.resetWriterIndex();
966         return this;
967     }
968 
969     @Override
970     public CompositeByteBuf ensureWritable(int minWritableBytes) {
971         wrapped.ensureWritable(minWritableBytes);
972         return this;
973     }
974 
975     @Override
976     public CompositeByteBuf getBytes(int index, ByteBuf dst) {
977         wrapped.getBytes(index, dst);
978         return this;
979     }
980 
981     @Override
982     public CompositeByteBuf getBytes(int index, ByteBuf dst, int length) {
983         wrapped.getBytes(index, dst, length);
984         return this;
985     }
986 
987     @Override
988     public CompositeByteBuf getBytes(int index, byte[] dst) {
989         wrapped.getBytes(index, dst);
990         return this;
991     }
992 
993     @Override
994     public CompositeByteBuf setBoolean(int index, boolean value) {
995         wrapped.setBoolean(index, value);
996         return this;
997     }
998 
999     @Override
1000     public CompositeByteBuf setChar(int index, int value) {
1001         wrapped.setChar(index, value);
1002         return this;
1003     }
1004 
1005     @Override
1006     public CompositeByteBuf setFloat(int index, float value) {
1007         wrapped.setFloat(index, value);
1008         return this;
1009     }
1010 
1011     @Override
1012     public CompositeByteBuf setDouble(int index, double value) {
1013         wrapped.setDouble(index, value);
1014         return this;
1015     }
1016 
1017     @Override
1018     public CompositeByteBuf setBytes(int index, ByteBuf src) {
1019         wrapped.setBytes(index, src);
1020         return this;
1021     }
1022 
1023     @Override
1024     public CompositeByteBuf setBytes(int index, ByteBuf src, int length) {
1025         wrapped.setBytes(index, src, length);
1026         return this;
1027     }
1028 
1029     @Override
1030     public CompositeByteBuf setBytes(int index, byte[] src) {
1031         wrapped.setBytes(index, src);
1032         return this;
1033     }
1034 
1035     @Override
1036     public CompositeByteBuf setZero(int index, int length) {
1037         wrapped.setZero(index, length);
1038         return this;
1039     }
1040 
1041     @Override
1042     public CompositeByteBuf readBytes(ByteBuf dst) {
1043         wrapped.readBytes(dst);
1044         return this;
1045     }
1046 
1047     @Override
1048     public CompositeByteBuf readBytes(ByteBuf dst, int length) {
1049         wrapped.readBytes(dst, length);
1050         return this;
1051     }
1052 
1053     @Override
1054     public CompositeByteBuf readBytes(ByteBuf dst, int dstIndex, int length) {
1055         wrapped.readBytes(dst, dstIndex, length);
1056         return this;
1057     }
1058 
1059     @Override
1060     public CompositeByteBuf readBytes(byte[] dst) {
1061         wrapped.readBytes(dst);
1062         return this;
1063     }
1064 
1065     @Override
1066     public CompositeByteBuf readBytes(byte[] dst, int dstIndex, int length) {
1067         wrapped.readBytes(dst, dstIndex, length);
1068         return this;
1069     }
1070 
1071     @Override
1072     public CompositeByteBuf readBytes(ByteBuffer dst) {
1073         wrapped.readBytes(dst);
1074         return this;
1075     }
1076 
1077     @Override
1078     public CompositeByteBuf readBytes(OutputStream out, int length) throws IOException {
1079         wrapped.readBytes(out, length);
1080         return this;
1081     }
1082 
1083     @Override
1084     public int getBytes(int index, FileChannel out, long position, int length) throws IOException {
1085         return wrapped.getBytes(index, out, position, length);
1086     }
1087 
1088     @Override
1089     public int setBytes(int index, FileChannel in, long position, int length) throws IOException {
1090         return wrapped.setBytes(index, in, position, length);
1091     }
1092 
1093     @Override
1094     public boolean isReadOnly() {
1095         return wrapped.isReadOnly();
1096     }
1097 
1098     @Override
1099     public ByteBuf asReadOnly() {
1100         return wrapped.asReadOnly();
1101     }
1102 
1103     @Override
1104     protected SwappedByteBuf newSwappedByteBuf() {
1105         return wrapped.newSwappedByteBuf();
1106     }
1107 
1108     @Override
1109     public CharSequence getCharSequence(int index, int length, Charset charset) {
1110         return wrapped.getCharSequence(index, length, charset);
1111     }
1112 
1113     @Override
1114     public CharSequence readCharSequence(int length, Charset charset) {
1115         return wrapped.readCharSequence(length, charset);
1116     }
1117 
1118     @Override
1119     public int setCharSequence(int index, CharSequence sequence, Charset charset) {
1120         return wrapped.setCharSequence(index, sequence, charset);
1121     }
1122 
1123     @Override
1124     public int readBytes(FileChannel out, long position, int length) throws IOException {
1125         return wrapped.readBytes(out, position, length);
1126     }
1127 
1128     @Override
1129     public int writeBytes(FileChannel in, long position, int length) throws IOException {
1130         return wrapped.writeBytes(in, position, length);
1131     }
1132 
1133     @Override
1134     public int writeCharSequence(CharSequence sequence, Charset charset) {
1135         return wrapped.writeCharSequence(sequence, charset);
1136     }
1137 
1138     @Override
1139     public CompositeByteBuf skipBytes(int length) {
1140         wrapped.skipBytes(length);
1141         return this;
1142     }
1143 
1144     @Override
1145     public CompositeByteBuf writeBoolean(boolean value) {
1146         wrapped.writeBoolean(value);
1147         return this;
1148     }
1149 
1150     @Override
1151     public CompositeByteBuf writeByte(int value) {
1152         wrapped.writeByte(value);
1153         return this;
1154     }
1155 
1156     @Override
1157     public CompositeByteBuf writeShort(int value) {
1158         wrapped.writeShort(value);
1159         return this;
1160     }
1161 
1162     @Override
1163     public CompositeByteBuf writeMedium(int value) {
1164         wrapped.writeMedium(value);
1165         return this;
1166     }
1167 
1168     @Override
1169     public CompositeByteBuf writeInt(int value) {
1170         wrapped.writeInt(value);
1171         return this;
1172     }
1173 
1174     @Override
1175     public CompositeByteBuf writeLong(long value) {
1176         wrapped.writeLong(value);
1177         return this;
1178     }
1179 
1180     @Override
1181     public CompositeByteBuf writeChar(int value) {
1182         wrapped.writeChar(value);
1183         return this;
1184     }
1185 
1186     @Override
1187     public CompositeByteBuf writeFloat(float value) {
1188         wrapped.writeFloat(value);
1189         return this;
1190     }
1191 
1192     @Override
1193     public CompositeByteBuf writeDouble(double value) {
1194         wrapped.writeDouble(value);
1195         return this;
1196     }
1197 
1198     @Override
1199     public CompositeByteBuf writeBytes(ByteBuf src) {
1200         wrapped.writeBytes(src);
1201         return this;
1202     }
1203 
1204     @Override
1205     public CompositeByteBuf writeBytes(ByteBuf src, int length) {
1206         wrapped.writeBytes(src, length);
1207         return this;
1208     }
1209 
1210     @Override
1211     public CompositeByteBuf writeBytes(ByteBuf src, int srcIndex, int length) {
1212         wrapped.writeBytes(src, srcIndex, length);
1213         return this;
1214     }
1215 
1216     @Override
1217     public CompositeByteBuf writeBytes(byte[] src) {
1218         wrapped.writeBytes(src);
1219         return this;
1220     }
1221 
1222     @Override
1223     public CompositeByteBuf writeBytes(byte[] src, int srcIndex, int length) {
1224         wrapped.writeBytes(src, srcIndex, length);
1225         return this;
1226     }
1227 
1228     @Override
1229     public CompositeByteBuf writeBytes(ByteBuffer src) {
1230         wrapped.writeBytes(src);
1231         return this;
1232     }
1233 
1234     @Override
1235     public CompositeByteBuf writeZero(int length) {
1236         wrapped.writeZero(length);
1237         return this;
1238     }
1239 
1240     @Override
1241     public CompositeByteBuf retain(int increment) {
1242         wrapped.retain(increment);
1243         return this;
1244     }
1245 
1246     @Override
1247     public CompositeByteBuf retain() {
1248         wrapped.retain();
1249         return this;
1250     }
1251 
1252     @Override
1253     public CompositeByteBuf touch() {
1254         wrapped.touch();
1255         return this;
1256     }
1257 
1258     @Override
1259     public CompositeByteBuf touch(Object hint) {
1260         wrapped.touch(hint);
1261         return this;
1262     }
1263 
1264     @Override
1265     public ByteBuffer[] nioBuffers() {
1266         return wrapped.nioBuffers();
1267     }
1268 
1269     @Override
1270     public CompositeByteBuf discardSomeReadBytes() {
1271         wrapped.discardSomeReadBytes();
1272         return this;
1273     }
1274 
1275     @Override
1276     public final void deallocate() {
1277         wrapped.deallocate();
1278     }
1279 
1280     @Override
1281     public final ByteBuf unwrap() {
1282         return wrapped;
1283     }
1284 }