98 offset); 99 #else[rw] 100 return duplicate(); 101 #end[rw] 102 } 103 104 #if[rw] 105 106 protected int ix(int i) { 107 return (i << $LG_BYTES_PER_VALUE$) + offset; 108 } 109 110 public $type$ get() { 111 return Bits.get$Type$$BO$(bb, ix(nextGetIndex())); 112 } 113 114 public $type$ get(int i) { 115 return Bits.get$Type$$BO$(bb, ix(checkIndex(i))); 116 } 117 118 #end[rw] 119 120 public $Type$Buffer put($type$ x) { 121 #if[rw] 122 Bits.put$Type$$BO$(bb, ix(nextPutIndex()), x); 123 return this; 124 #else[rw] 125 throw new ReadOnlyBufferException(); 126 #end[rw] 127 } 128 129 public $Type$Buffer put(int i, $type$ x) { 130 #if[rw] 131 Bits.put$Type$$BO$(bb, ix(checkIndex(i)), x); 132 return this; 133 #else[rw] 134 throw new ReadOnlyBufferException(); 135 #end[rw] 136 } 137 | 98 offset); 99 #else[rw] 100 return duplicate(); 101 #end[rw] 102 } 103 104 #if[rw] 105 106 protected int ix(int i) { 107 return (i << $LG_BYTES_PER_VALUE$) + offset; 108 } 109 110 public $type$ get() { 111 return Bits.get$Type$$BO$(bb, ix(nextGetIndex())); 112 } 113 114 public $type$ get(int i) { 115 return Bits.get$Type$$BO$(bb, ix(checkIndex(i))); 116 } 117 118 #if[streamableType] 119 $type$ getUnchecked(int i) { 120 return Bits.get$Type$$BO$(bb, ix(i)); 121 } 122 #end[streamableType] 123 124 #end[rw] 125 126 public $Type$Buffer put($type$ x) { 127 #if[rw] 128 Bits.put$Type$$BO$(bb, ix(nextPutIndex()), x); 129 return this; 130 #else[rw] 131 throw new ReadOnlyBufferException(); 132 #end[rw] 133 } 134 135 public $Type$Buffer put(int i, $type$ x) { 136 #if[rw] 137 Bits.put$Type$$BO$(bb, ix(checkIndex(i)), x); 138 return this; 139 #else[rw] 140 throw new ReadOnlyBufferException(); 141 #end[rw] 142 } 143 |