36 |
exception statement from your version. */ |
exception statement from your version. */ |
37 |
|
|
38 |
package java.nio; |
package java.nio; |
39 |
|
|
40 |
|
import gnu.java.nio.FloatBufferImpl; |
41 |
|
|
42 |
public abstract class FloatBuffer extends Buffer |
public abstract class FloatBuffer extends Buffer |
43 |
{ |
{ |
44 |
private ByteOrder endian = ByteOrder.BIG_ENDIAN; |
private ByteOrder endian = ByteOrder.BIG_ENDIAN; |
45 |
protected float [] backing_buffer; |
protected float [] backing_buffer; |
46 |
public static FloatBuffer allocateDirect(int capacity) |
public static FloatBuffer allocateDirect(int capacity) |
47 |
{ |
{ |
48 |
FloatBuffer b = new gnu.java.nio. FloatBufferImpl(capacity, 0, capacity); |
return new FloatBufferImpl (capacity, 0, capacity); |
|
return b; |
|
49 |
} |
} |
50 |
public static FloatBuffer allocate(int capacity) |
public static FloatBuffer allocate(int capacity) |
51 |
{ |
{ |
52 |
FloatBuffer b = new gnu.java.nio. FloatBufferImpl(capacity, 0, capacity); |
return new FloatBufferImpl (capacity, 0, capacity); |
|
return b; |
|
53 |
} |
} |
54 |
final public static FloatBuffer wrap(float[] array, |
final public static FloatBuffer wrap(float[] array, |
55 |
int offset, |
int offset, |
56 |
int length) |
int length) |
57 |
{ |
{ |
58 |
gnu.java.nio.FloatBufferImpl b = new gnu.java.nio. FloatBufferImpl(array, offset, length); |
return new FloatBufferImpl(array, offset, length); |
|
return b; |
|
59 |
} |
} |
60 |
final public static FloatBuffer wrap(String a) |
final public static FloatBuffer wrap(String a) |
61 |
{ |
{ |
138 |
return 1; |
return 1; |
139 |
} |
} |
140 |
int r = remaining(); |
int r = remaining(); |
141 |
int i1 = pos; |
int i1 = position (); |
142 |
int i2 = a.pos; |
int i2 = a.position (); |
143 |
for (int i=0;i<r;i++) |
for (int i=0;i<r;i++) |
144 |
{ |
{ |
145 |
int t = (int) (get(i1)- a.get(i2)); |
int t = (int) (get(i1)- a.get(i2)); |