查看本类的 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    *   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 java.io.IOException;
19  import java.io.InputStream;
20  import java.io.OutputStream;
21  import java.nio.ByteBuffer;
22  import java.nio.ByteOrder;
23  import java.nio.channels.GatheringByteChannel;
24  import java.nio.channels.ScatteringByteChannel;
25  import java.nio.charset.Charset;
26  import java.util.Iterator;
27  import java.util.List;
28  
29  class WrappedCompositeByteBuf extends CompositeByteBuf {
30  
31      private final CompositeByteBuf wrapped;
32  
33      WrappedCompositeByteBuf(CompositeByteBuf wrapped) {
34          super(wrapped.alloc());
35          this.wrapped = wrapped;
36      }
37  
38      @Override
39      public boolean release() {
40          return wrapped.release();
41      }
42  
43      @Override
44      public boolean release(int decrement) {
45          return wrapped.release(decrement);
46      }
47  
48      @Override
49      public final int maxCapacity() {
50          return wrapped.maxCapacity();
51      }
52  
53      @Override
54      public final int readerIndex() {
55          return wrapped.readerIndex();
56      }
57  
58      @Override
59      public final int writerIndex() {
60          return wrapped.writerIndex();
61      }
62  
63      @Override
64      public final boolean isReadable() {
65          return wrapped.isReadable();
66      }
67  
68      @Override
69      public final boolean isReadable(int numBytes) {
70          return wrapped.isReadable(numBytes);
71      }
72  
73      @Override
74      public final boolean isWritable() {
75          return wrapped.isWritable();
76      }
77  
78      @Override
79      public final boolean isWritable(int numBytes) {
80          return wrapped.isWritable(numBytes);
81      }
82  
83      @Override
84      public final int readableBytes() {
85          return wrapped.readableBytes();
86      }
87  
88      @Override
89      public final int writableBytes() {
90          return wrapped.writableBytes();
91      }
92  
93      @Override
94      public final int maxWritableBytes() {
95          return wrapped.maxWritableBytes();
96      }
97  
98      @Override
99      public int ensureWritable(int minWritableBytes, boolean force) {
100         return wrapped.ensureWritable(minWritableBytes, force);
101     }
102 
103     @Override
104     public ByteBuf order(ByteOrder endianness) {
105         return wrapped.order(endianness);
106     }
107 
108     @Override
109     public boolean getBoolean(int index) {
110         return wrapped.getBoolean(index);
111     }
112 
113     @Override
114     public short getUnsignedByte(int index) {
115         return wrapped.getUnsignedByte(index);
116     }
117 
118     @Override
119     public short getShort(int index) {
120         return wrapped.getShort(index);
121     }
122 
123     @Override
124     public int getUnsignedShort(int index) {
125         return wrapped.getUnsignedShort(index);
126     }
127 
128     @Override
129     public int getUnsignedMedium(int index) {
130         return wrapped.getUnsignedMedium(index);
131     }
132 
133     @Override
134     public int getMedium(int index) {
135         return wrapped.getMedium(index);
136     }
137 
138     @Override
139     public int getInt(int index) {
140         return wrapped.getInt(index);
141     }
142 
143     @Override
144     public long getUnsignedInt(int index) {
145         return wrapped.getUnsignedInt(index);
146     }
147 
148     @Override
149     public long getLong(int index) {
150         return wrapped.getLong(index);
151     }
152 
153     @Override
154     public char getChar(int index) {
155         return wrapped.getChar(index);
156     }
157 
158     @Override
159     public float getFloat(int index) {
160         return wrapped.getFloat(index);
161     }
162 
163     @Override
164     public double getDouble(int index) {
165         return wrapped.getDouble(index);
166     }
167 
168     @Override
169     public byte readByte() {
170         return wrapped.readByte();
171     }
172 
173     @Override
174     public boolean readBoolean() {
175         return wrapped.readBoolean();
176     }
177 
178     @Override
179     public short readUnsignedByte() {
180         return wrapped.readUnsignedByte();
181     }
182 
183     @Override
184     public short readShort() {
185         return wrapped.readShort();
186     }
187 
188     @Override
189     public int readUnsignedShort() {
190         return wrapped.readUnsignedShort();
191     }
192 
193     @Override
194     public int readMedium() {
195         return wrapped.readMedium();
196     }
197 
198     @Override
199     public int readUnsignedMedium() {
200         return wrapped.readUnsignedMedium();
201     }
202 
203     @Override
204     public int readInt() {
205         return wrapped.readInt();
206     }
207 
208     @Override
209     public long readUnsignedInt() {
210         return wrapped.readUnsignedInt();
211     }
212 
213     @Override
214     public long readLong() {
215         return wrapped.readLong();
216     }
217 
218     @Override
219     public char readChar() {
220         return wrapped.readChar();
221     }
222 
223     @Override
224     public float readFloat() {
225         return wrapped.readFloat();
226     }
227 
228     @Override
229     public double readDouble() {
230         return wrapped.readDouble();
231     }
232 
233     @Override
234     public ByteBuf readBytes(int length) {
235         return wrapped.readBytes(length);
236     }
237 
238     @Override
239     public ByteBuf slice() {
240         return wrapped.slice();
241     }
242 
243     @Override
244     public ByteBuf slice(int index, int length) {
245         return wrapped.slice(index, length);
246     }
247 
248     @Override
249     public ByteBuffer nioBuffer() {
250         return wrapped.nioBuffer();
251     }
252 
253     @Override
254     public String toString(Charset charset) {
255         return wrapped.toString(charset);
256     }
257 
258     @Override
259     public String toString(int index, int length, Charset charset) {
260         return wrapped.toString(index, length, charset);
261     }
262 
263     @Override
264     public int indexOf(int fromIndex, int toIndex, byte value) {
265         return wrapped.indexOf(fromIndex, toIndex, value);
266     }
267 
268     @Override
269     public int bytesBefore(byte value) {
270         return wrapped.bytesBefore(value);
271     }
272 
273     @Override
274     public int bytesBefore(int length, byte value) {
275         return wrapped.bytesBefore(length, value);
276     }
277 
278     @Override
279     public int bytesBefore(int index, int length, byte value) {
280         return wrapped.bytesBefore(index, length, value);
281     }
282 
283     @Override
284     public int forEachByte(ByteBufProcessor processor) {
285         return wrapped.forEachByte(processor);
286     }
287 
288     @Override
289     public int forEachByte(int index, int length, ByteBufProcessor processor) {
290         return wrapped.forEachByte(index, length, processor);
291     }
292 
293     @Override
294     public int forEachByteDesc(ByteBufProcessor processor) {
295         return wrapped.forEachByteDesc(processor);
296     }
297 
298     @Override
299     public int forEachByteDesc(int index, int length, ByteBufProcessor processor) {
300         return wrapped.forEachByteDesc(index, length, processor);
301     }
302 
303     @Override
304     public final int hashCode() {
305         return wrapped.hashCode();
306     }
307 
308     @Override
309     public final boolean equals(Object o) {
310         return wrapped.equals(o);
311     }
312 
313     @Override
314     public final int compareTo(ByteBuf that) {
315         return wrapped.compareTo(that);
316     }
317 
318     @Override
319     public final int refCnt() {
320         return wrapped.refCnt();
321     }
322 
323     @Override
324     public ByteBuf duplicate() {
325         return wrapped.duplicate();
326     }
327 
328     @Override
329     public ByteBuf readSlice(int length) {
330         return wrapped.readSlice(length);
331     }
332 
333     @Override
334     public int readBytes(GatheringByteChannel out, int length) throws IOException {
335         return wrapped.readBytes(out, length);
336     }
337 
338     @Override
339     public int writeBytes(InputStream in, int length) throws IOException {
340         return wrapped.writeBytes(in, length);
341     }
342 
343     @Override
344     public int writeBytes(ScatteringByteChannel in, int length) throws IOException {
345         return wrapped.writeBytes(in, length);
346     }
347 
348     @Override
349     public ByteBuf copy() {
350         return wrapped.copy();
351     }
352 
353     @Override
354     public CompositeByteBuf addComponent(ByteBuf buffer) {
355         wrapped.addComponent(buffer);
356         return this;
357     }
358 
359     @Override
360     public CompositeByteBuf addComponents(ByteBuf... buffers) {
361         wrapped.addComponents(buffers);
362         return this;
363     }
364 
365     @Override
366     public CompositeByteBuf addComponents(Iterable<ByteBuf> buffers) {
367         wrapped.addComponents(buffers);
368         return this;
369     }
370 
371     @Override
372     public CompositeByteBuf addComponent(int cIndex, ByteBuf buffer) {
373         wrapped.addComponent(cIndex, buffer);
374         return this;
375     }
376 
377     @Override
378     public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers) {
379         wrapped.addComponents(cIndex, buffers);
380         return this;
381     }
382 
383     @Override
384     public CompositeByteBuf addComponents(int cIndex, Iterable<ByteBuf> buffers) {
385         wrapped.addComponents(cIndex, buffers);
386         return this;
387     }
388 
389     @Override
390     public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer) {
391         wrapped.addComponent(increaseWriterIndex, buffer);
392         return this;
393     }
394 
395     @Override
396     public CompositeByteBuf addComponents(boolean increaseWriterIndex, ByteBuf... buffers) {
397         wrapped.addComponents(increaseWriterIndex, buffers);
398         return this;
399     }
400 
401     @Override
402     public CompositeByteBuf addComponents(boolean increaseWriterIndex, Iterable<ByteBuf> buffers) {
403         wrapped.addComponents(increaseWriterIndex, buffers);
404         return this;
405     }
406 
407     @Override
408     public CompositeByteBuf addComponent(boolean increaseWriterIndex, int cIndex, ByteBuf buffer) {
409         wrapped.addComponent(increaseWriterIndex, cIndex, buffer);
410         return this;
411     }
412 
413     @Override
414     public CompositeByteBuf removeComponent(int cIndex) {
415         wrapped.removeComponent(cIndex);
416         return this;
417     }
418 
419     @Override
420     public CompositeByteBuf removeComponents(int cIndex, int numComponents) {
421         wrapped.removeComponents(cIndex, numComponents);
422         return this;
423     }
424 
425     @Override
426     public Iterator<ByteBuf> iterator() {
427         return wrapped.iterator();
428     }
429 
430     @Override
431     public List<ByteBuf> decompose(int offset, int length) {
432         return wrapped.decompose(offset, length);
433     }
434 
435     @Override
436     public final boolean isDirect() {
437         return wrapped.isDirect();
438     }
439 
440     @Override
441     public final boolean hasArray() {
442         return wrapped.hasArray();
443     }
444 
445     @Override
446     public final byte[] array() {
447         return wrapped.array();
448     }
449 
450     @Override
451     public final int arrayOffset() {
452         return wrapped.arrayOffset();
453     }
454 
455     @Override
456     public final boolean hasMemoryAddress() {
457         return wrapped.hasMemoryAddress();
458     }
459 
460     @Override
461     public final long memoryAddress() {
462         return wrapped.memoryAddress();
463     }
464 
465     @Override
466     public final int capacity() {
467         return wrapped.capacity();
468     }
469 
470     @Override
471     public CompositeByteBuf capacity(int newCapacity) {
472         wrapped.capacity(newCapacity);
473         return this;
474     }
475 
476     @Override
477     public final ByteBufAllocator alloc() {
478         return wrapped.alloc();
479     }
480 
481     @Override
482     public final ByteOrder order() {
483         return wrapped.order();
484     }
485 
486     @Override
487     public final int numComponents() {
488         return wrapped.numComponents();
489     }
490 
491     @Override
492     public final int maxNumComponents() {
493         return wrapped.maxNumComponents();
494     }
495 
496     @Override
497     public final int toComponentIndex(int offset) {
498         return wrapped.toComponentIndex(offset);
499     }
500 
501     @Override
502     public final int toByteIndex(int cIndex) {
503         return wrapped.toByteIndex(cIndex);
504     }
505 
506     @Override
507     public byte getByte(int index) {
508         return wrapped.getByte(index);
509     }
510 
511     @Override
512     protected final byte _getByte(int index) {
513         return wrapped._getByte(index);
514     }
515 
516     @Override
517     protected final short _getShort(int index) {
518         return wrapped._getShort(index);
519     }
520 
521     @Override
522     protected final int _getUnsignedMedium(int index) {
523         return wrapped._getUnsignedMedium(index);
524     }
525 
526     @Override
527     protected final int _getInt(int index) {
528         return wrapped._getInt(index);
529     }
530 
531     @Override
532     protected final long _getLong(int index) {
533         return wrapped._getLong(index);
534     }
535 
536     @Override
537     public CompositeByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
538         wrapped.getBytes(index, dst, dstIndex, length);
539         return this;
540     }
541 
542     @Override
543     public CompositeByteBuf getBytes(int index, ByteBuffer dst) {
544         wrapped.getBytes(index, dst);
545         return this;
546     }
547 
548     @Override
549     public CompositeByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) {
550         wrapped.getBytes(index, dst, dstIndex, length);
551         return this;
552     }
553 
554     @Override
555     public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
556         return wrapped.getBytes(index, out, length);
557     }
558 
559     @Override
560     public CompositeByteBuf getBytes(int index, OutputStream out, int length) throws IOException {
561         wrapped.getBytes(index, out, length);
562         return this;
563     }
564 
565     @Override
566     public CompositeByteBuf setByte(int index, int value) {
567         wrapped.setByte(index, value);
568         return this;
569     }
570 
571     @Override
572     protected final void _setByte(int index, int value) {
573         wrapped._setByte(index, value);
574     }
575 
576     @Override
577     public CompositeByteBuf setShort(int index, int value) {
578         wrapped.setShort(index, value);
579         return this;
580     }
581 
582     @Override
583     protected final void _setShort(int index, int value) {
584         wrapped._setShort(index, value);
585     }
586 
587     @Override
588     public CompositeByteBuf setMedium(int index, int value) {
589         wrapped.setMedium(index, value);
590         return this;
591     }
592 
593     @Override
594     protected final void _setMedium(int index, int value) {
595         wrapped._setMedium(index, value);
596     }
597 
598     @Override
599     public CompositeByteBuf setInt(int index, int value) {
600         wrapped.setInt(index, value);
601         return this;
602     }
603 
604     @Override
605     protected final void _setInt(int index, int value) {
606         wrapped._setInt(index, value);
607     }
608 
609     @Override
610     public CompositeByteBuf setLong(int index, long value) {
611         wrapped.setLong(index, value);
612         return this;
613     }
614 
615     @Override
616     protected final void _setLong(int index, long value) {
617         wrapped._setLong(index, value);
618     }
619 
620     @Override
621     public CompositeByteBuf setBytes(int index, byte[] src, int srcIndex, int length) {
622         wrapped.setBytes(index, src, srcIndex, length);
623         return this;
624     }
625 
626     @Override
627     public CompositeByteBuf setBytes(int index, ByteBuffer src) {
628         wrapped.setBytes(index, src);
629         return this;
630     }
631 
632     @Override
633     public CompositeByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) {
634         wrapped.setBytes(index, src, srcIndex, length);
635         return this;
636     }
637 
638     @Override
639     public int setBytes(int index, InputStream in, int length) throws IOException {
640         return wrapped.setBytes(index, in, length);
641     }
642 
643     @Override
644     public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
645         return wrapped.setBytes(index, in, length);
646     }
647 
648     @Override
649     public ByteBuf copy(int index, int length) {
650         return wrapped.copy(index, length);
651     }
652 
653     @Override
654     public final ByteBuf component(int cIndex) {
655         return wrapped.component(cIndex);
656     }
657 
658     @Override
659     public final ByteBuf componentAtOffset(int offset) {
660         return wrapped.componentAtOffset(offset);
661     }
662 
663     @Override
664     public final ByteBuf internalComponent(int cIndex) {
665         return wrapped.internalComponent(cIndex);
666     }
667 
668     @Override
669     public final ByteBuf internalComponentAtOffset(int offset) {
670         return wrapped.internalComponentAtOffset(offset);
671     }
672 
673     @Override
674     public int nioBufferCount() {
675         return wrapped.nioBufferCount();
676     }
677 
678     @Override
679     public ByteBuffer internalNioBuffer(int index, int length) {
680         return wrapped.internalNioBuffer(index, length);
681     }
682 
683     @Override
684     public ByteBuffer nioBuffer(int index, int length) {
685         return wrapped.nioBuffer(index, length);
686     }
687 
688     @Override
689     public ByteBuffer[] nioBuffers(int index, int length) {
690         return wrapped.nioBuffers(index, length);
691     }
692 
693     @Override
694     public CompositeByteBuf consolidate() {
695         wrapped.consolidate();
696         return this;
697     }
698 
699     @Override
700     public CompositeByteBuf consolidate(int cIndex, int numComponents) {
701         wrapped.consolidate(cIndex, numComponents);
702         return this;
703     }
704 
705     @Override
706     public CompositeByteBuf discardReadComponents() {
707         wrapped.discardReadComponents();
708         return this;
709     }
710 
711     @Override
712     public CompositeByteBuf discardReadBytes() {
713         wrapped.discardReadBytes();
714         return this;
715     }
716 
717     @Override
718     public final String toString() {
719         return wrapped.toString();
720     }
721 
722     @Override
723     public final CompositeByteBuf readerIndex(int readerIndex) {
724         wrapped.readerIndex(readerIndex);
725         return this;
726     }
727 
728     @Override
729     public final CompositeByteBuf writerIndex(int writerIndex) {
730         wrapped.writerIndex(writerIndex);
731         return this;
732     }
733 
734     @Override
735     public final CompositeByteBuf setIndex(int readerIndex, int writerIndex) {
736         wrapped.setIndex(readerIndex, writerIndex);
737         return this;
738     }
739 
740     @Override
741     public final CompositeByteBuf clear() {
742         wrapped.clear();
743         return this;
744     }
745 
746     @Override
747     public final CompositeByteBuf markReaderIndex() {
748         wrapped.markReaderIndex();
749         return this;
750     }
751 
752     @Override
753     public final CompositeByteBuf resetReaderIndex() {
754         wrapped.resetReaderIndex();
755         return this;
756     }
757 
758     @Override
759     public final CompositeByteBuf markWriterIndex() {
760         wrapped.markWriterIndex();
761         return this;
762     }
763 
764     @Override
765     public final CompositeByteBuf resetWriterIndex() {
766         wrapped.resetWriterIndex();
767         return this;
768     }
769 
770     @Override
771     public CompositeByteBuf ensureWritable(int minWritableBytes) {
772         wrapped.ensureWritable(minWritableBytes);
773         return this;
774     }
775 
776     @Override
777     public CompositeByteBuf getBytes(int index, ByteBuf dst) {
778         wrapped.getBytes(index, dst);
779         return this;
780     }
781 
782     @Override
783     public CompositeByteBuf getBytes(int index, ByteBuf dst, int length) {
784         wrapped.getBytes(index, dst, length);
785         return this;
786     }
787 
788     @Override
789     public CompositeByteBuf getBytes(int index, byte[] dst) {
790         wrapped.getBytes(index, dst);
791         return this;
792     }
793 
794     @Override
795     public CompositeByteBuf setBoolean(int index, boolean value) {
796         wrapped.setBoolean(index, value);
797         return this;
798     }
799 
800     @Override
801     public CompositeByteBuf setChar(int index, int value) {
802         wrapped.setChar(index, value);
803         return this;
804     }
805 
806     @Override
807     public CompositeByteBuf setFloat(int index, float value) {
808         wrapped.setFloat(index, value);
809         return this;
810     }
811 
812     @Override
813     public CompositeByteBuf setDouble(int index, double value) {
814         wrapped.setDouble(index, value);
815         return this;
816     }
817 
818     @Override
819     public CompositeByteBuf setBytes(int index, ByteBuf src) {
820         wrapped.setBytes(index, src);
821         return this;
822     }
823 
824     @Override
825     public CompositeByteBuf setBytes(int index, ByteBuf src, int length) {
826         wrapped.setBytes(index, src, length);
827         return this;
828     }
829 
830     @Override
831     public CompositeByteBuf setBytes(int index, byte[] src) {
832         wrapped.setBytes(index, src);
833         return this;
834     }
835 
836     @Override
837     public CompositeByteBuf setZero(int index, int length) {
838         wrapped.setZero(index, length);
839         return this;
840     }
841 
842     @Override
843     public CompositeByteBuf readBytes(ByteBuf dst) {
844         wrapped.readBytes(dst);
845         return this;
846     }
847 
848     @Override
849     public CompositeByteBuf readBytes(ByteBuf dst, int length) {
850         wrapped.readBytes(dst, length);
851         return this;
852     }
853 
854     @Override
855     public CompositeByteBuf readBytes(ByteBuf dst, int dstIndex, int length) {
856         wrapped.readBytes(dst, dstIndex, length);
857         return this;
858     }
859 
860     @Override
861     public CompositeByteBuf readBytes(byte[] dst) {
862         wrapped.readBytes(dst);
863         return this;
864     }
865 
866     @Override
867     public CompositeByteBuf readBytes(byte[] dst, int dstIndex, int length) {
868         wrapped.readBytes(dst, dstIndex, length);
869         return this;
870     }
871 
872     @Override
873     public CompositeByteBuf readBytes(ByteBuffer dst) {
874         wrapped.readBytes(dst);
875         return this;
876     }
877 
878     @Override
879     public CompositeByteBuf readBytes(OutputStream out, int length) throws IOException {
880         wrapped.readBytes(out, length);
881         return this;
882     }
883 
884     @Override
885     public CompositeByteBuf skipBytes(int length) {
886         wrapped.skipBytes(length);
887         return this;
888     }
889 
890     @Override
891     public CompositeByteBuf writeBoolean(boolean value) {
892         wrapped.writeBoolean(value);
893         return this;
894     }
895 
896     @Override
897     public CompositeByteBuf writeByte(int value) {
898         wrapped.writeByte(value);
899         return this;
900     }
901 
902     @Override
903     public CompositeByteBuf writeShort(int value) {
904         wrapped.writeShort(value);
905         return this;
906     }
907 
908     @Override
909     public CompositeByteBuf writeMedium(int value) {
910         wrapped.writeMedium(value);
911         return this;
912     }
913 
914     @Override
915     public CompositeByteBuf writeInt(int value) {
916         wrapped.writeInt(value);
917         return this;
918     }
919 
920     @Override
921     public CompositeByteBuf writeLong(long value) {
922         wrapped.writeLong(value);
923         return this;
924     }
925 
926     @Override
927     public CompositeByteBuf writeChar(int value) {
928         wrapped.writeChar(value);
929         return this;
930     }
931 
932     @Override
933     public CompositeByteBuf writeFloat(float value) {
934         wrapped.writeFloat(value);
935         return this;
936     }
937 
938     @Override
939     public CompositeByteBuf writeDouble(double value) {
940         wrapped.writeDouble(value);
941         return this;
942     }
943 
944     @Override
945     public CompositeByteBuf writeBytes(ByteBuf src) {
946         wrapped.writeBytes(src);
947         return this;
948     }
949 
950     @Override
951     public CompositeByteBuf writeBytes(ByteBuf src, int length) {
952         wrapped.writeBytes(src, length);
953         return this;
954     }
955 
956     @Override
957     public CompositeByteBuf writeBytes(ByteBuf src, int srcIndex, int length) {
958         wrapped.writeBytes(src, srcIndex, length);
959         return this;
960     }
961 
962     @Override
963     public CompositeByteBuf writeBytes(byte[] src) {
964         wrapped.writeBytes(src);
965         return this;
966     }
967 
968     @Override
969     public CompositeByteBuf writeBytes(byte[] src, int srcIndex, int length) {
970         wrapped.writeBytes(src, srcIndex, length);
971         return this;
972     }
973 
974     @Override
975     public CompositeByteBuf writeBytes(ByteBuffer src) {
976         wrapped.writeBytes(src);
977         return this;
978     }
979 
980     @Override
981     public CompositeByteBuf writeZero(int length) {
982         wrapped.writeZero(length);
983         return this;
984     }
985 
986     @Override
987     public CompositeByteBuf retain(int increment) {
988         wrapped.retain(increment);
989         return this;
990     }
991 
992     @Override
993     public CompositeByteBuf retain() {
994         wrapped.retain();
995         return this;
996     }
997 
998     @Override
999     public ByteBuffer[] nioBuffers() {
1000         return wrapped.nioBuffers();
1001     }
1002 
1003     @Override
1004     public CompositeByteBuf discardSomeReadBytes() {
1005         wrapped.discardSomeReadBytes();
1006         return this;
1007     }
1008 
1009     @Override
1010     public final void deallocate() {
1011         wrapped.deallocate();
1012     }
1013 
1014     @Override
1015     public final ByteBuf unwrap() {
1016         return wrapped;
1017     }
1018 }