1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.buffer;
17
18
19
20
21
22 final class ReadOnlyAbstractByteBuf extends ReadOnlyByteBuf {
23
24 ReadOnlyAbstractByteBuf(AbstractByteBuf buffer) {
25 super(buffer);
26 assert buffer.unwrap() == null || buffer.unwrap() instanceof AbstractByteBuf;
27 }
28
29 @Override
30 public AbstractByteBuf unwrap() {
31 return (AbstractByteBuf) super.unwrap();
32 }
33
34 @Override
35 protected byte _getByte(int index) {
36 return unwrap()._getByte(index);
37 }
38
39 @Override
40 protected short _getShort(int index) {
41 return unwrap()._getShort(index);
42 }
43
44 @Override
45 protected short _getShortLE(int index) {
46 return unwrap()._getShortLE(index);
47 }
48
49 @Override
50 protected int _getUnsignedMedium(int index) {
51 return unwrap()._getUnsignedMedium(index);
52 }
53
54 @Override
55 protected int _getUnsignedMediumLE(int index) {
56 return unwrap()._getUnsignedMediumLE(index);
57 }
58
59 @Override
60 protected int _getInt(int index) {
61 return unwrap()._getInt(index);
62 }
63
64 @Override
65 protected int _getIntLE(int index) {
66 return unwrap()._getIntLE(index);
67 }
68
69 @Override
70 protected long _getLong(int index) {
71 return unwrap()._getLong(index);
72 }
73
74 @Override
75 protected long _getLongLE(int index) {
76 return unwrap()._getLongLE(index);
77 }
78 }