comparison src/org/eclipse/jetty/io/JBuffer.java @ 1052:4a2489f1d5fe

remove JBuffer.peek()
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 08 Nov 2016 00:27:16 -0700
parents 1ab2dd0a7db5
children 7e4b41247544
comparison
equal deleted inserted replaced
1051:1ab2dd0a7db5 1052:4a2489f1d5fe
208 208
209 public void poke(int index, byte b) { 209 public void poke(int index, byte b) {
210 pokeBuffer(index).put(b); 210 pokeBuffer(index).put(b);
211 } 211 }
212 212
213 private JBuffer peekBuffer(int index) { 213
214 JBuffer dup = duplicate(); 214 public byte get(int index) {
215 dup.setGetIndex(index);
216 dup.setPutIndex(dup.capacity());
217 return dup;
218 }
219
220 public byte peek(int index) {
221 return bb.get(index); 215 return bb.get(index);
222 } 216 }
223 217
224 public byte peek() {
225 return peek(bb.position());
226 }
227
228 } 218 }