(ByteBuf bytes, int index)
| 44 | } |
| 45 | |
| 46 | public void writeIndex(ByteBuf bytes, int index) { |
| 47 | switch (this) { |
| 48 | case BYTE: { |
| 49 | bytes.writeByte(index); |
| 50 | break; |
| 51 | } |
| 52 | case SHORT: { |
| 53 | bytes.writeShort(index); |
| 54 | break; |
| 55 | } |
| 56 | case MEDIUM: { |
| 57 | bytes.writeMedium(index); |
| 58 | break; |
| 59 | } |
| 60 | default: |
| 61 | case INT: { |
| 62 | bytes.writeInt(index); |
| 63 | break; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | public int readIndex(ByteBuf bytes) { |
| 69 | switch (this) { |
no test coverage detected