comparison src/org/eclipse/jetty/io/JBuffer.java @ 1062:4a50422596b6

fix JBuffer.getByteBuffer()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 09 Nov 2016 02:04:02 -0700
parents c880589715c7
children 0157e92670f5
comparison
equal deleted inserted replaced
1061:c880589715c7 1062:4a50422596b6
25 return bb.position(); 25 return bb.position();
26 } 26 }
27 27
28 public void position(int i) { 28 public void position(int i) {
29 bb.position(i); 29 bb.position(i);
30 }
31
32 public int limit() {
33 return bb.limit();
30 } 34 }
31 35
32 public void limit(int i) { 36 public void limit(int i) {
33 bb.limit(i); 37 bb.limit(i);
34 } 38 }
77 } 81 }
78 82
79 83
80 84
81 public ByteBuffer getByteBuffer() { 85 public ByteBuffer getByteBuffer() {
82 ByteBuffer dup = bb.duplicate(); 86 return bb;
83 dup.limit(dup.capacity());
84 return dup;
85 } 87 }
86 88
87 public int getIndex() { 89 public int getIndex() {
88 return bb.position(); 90 return bb.position();
89 } 91 }