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