File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
classes/modules/java.base/java/nio Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,9 @@ public ByteBuffer putLong(long x) {
263
263
264
264
return this ;
265
265
}
266
+ public int arrayOffset (){
267
+ return offset ;
268
+ }
266
269
267
270
@ Override
268
271
public byte [] array () {
@@ -316,4 +319,9 @@ public boolean equals(Object ob) {
316
319
Object base () {
317
320
return array ;
318
321
}
322
+ @ Override
323
+ public final ByteBuffer flip () {
324
+ super .flip ();
325
+ return this ;
326
+ }
319
327
}
Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ public static CharBuffer wrap(CharSequence outMess) {
88
88
charBuffer .flip ();
89
89
return charBuffer ;
90
90
}
91
+ public int arrayOffset (){
92
+ return offset ;
93
+ }
91
94
92
95
@ Override
93
96
public char [] array () {
Original file line number Diff line number Diff line change
1
+ import gov .nasa .jpf .util .test .TestJPF ;
2
+ import org .junit .Test ;
3
+
4
+ import java .nio .CharBuffer ;
5
+ import java .nio .charset .CharacterCodingException ;
6
+ import java .nio .charset .CharsetEncoder ;
7
+ import java .nio .charset .StandardCharsets ;
8
+
9
+ public class CharBufferTest extends TestJPF {
10
+ @ Test
11
+ public void Test_Wrap () throws CharacterCodingException {
12
+ if (verifyNoPropertyViolation ()){
13
+ java .nio .charset .StandardCharsets .UTF_8 .newEncoder ().encode (java .nio .CharBuffer .wrap ("heyo" ));
14
+ }
15
+ }
16
+ }
You can’t perform that action at this time.
0 commit comments