39 |
import java.nio.*; |
import java.nio.*; |
40 |
public final class ByteBufferImpl extends java.nio. ByteBuffer |
public final class ByteBufferImpl extends java.nio. ByteBuffer |
41 |
{ |
{ |
42 |
|
private byte[] backing_buffer; |
43 |
private int array_offset; |
private int array_offset; |
44 |
private boolean ro; |
private boolean ro; |
45 |
public ByteBufferImpl(int cap, int off, int lim) |
public ByteBufferImpl(int cap, int off, int lim) |
46 |
{ |
{ |
47 |
this.backing_buffer = new byte[cap]; |
this.backing_buffer = new byte[cap]; |
48 |
this.capacity(cap); |
this.cap = cap; |
49 |
this.position(off); |
this.position(off); |
50 |
this.limit(lim); |
this.limit(lim); |
51 |
} |
} |
52 |
public ByteBufferImpl(byte[] array, int off, int lim) |
public ByteBufferImpl(byte[] array, int off, int lim) |
53 |
{ |
{ |
54 |
this.backing_buffer = array; |
this.backing_buffer = array; |
55 |
this.capacity(array.length); |
this.cap = array.length; |
56 |
this.position(off); |
this.position(off); |
57 |
this.limit(lim); |
this.limit(lim); |
58 |
} |
} |