List of usage examples for java.nio FloatBuffer allocate
public static FloatBuffer allocate(int capacity)
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);// w ww. ja v a 2s. c om floatBuffer.rewind(); FloatBuffer floatBuffer1 = floatBuffer.slice(); System.out.println(floatBuffer.equals(floatBuffer1)); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);// ww w .j a v a 2 s . c o m floatBuffer.rewind(); FloatBuffer floatBuffer1 = floatBuffer.compact(); System.out.println(floatBuffer.equals(floatBuffer1)); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);/*w ww . j av a2s . c o m*/ floatBuffer.rewind(); FloatBuffer floatBuffer1 = floatBuffer.compact(); System.out.println(floatBuffer.compareTo(floatBuffer1)); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);/* w ww . ja v a2 s . c om*/ floatBuffer.rewind(); FloatBuffer floatBuffer1 = FloatBuffer.allocate(10); floatBuffer1.put(floatBuffer); System.out.println(floatBuffer.arrayOffset()); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(1.23F);/* www . j a v a2 s. com*/ System.out.println(Arrays.toString(floatBuffer.array())); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(1, 1.23F);/*w w w . j ava2 s. c om*/ System.out.println(Arrays.toString(floatBuffer.array())); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(new float[] { 1.23F, 2.13F, 3.13F, 2.13F, }, 0, 2); System.out.println(Arrays.toString(floatBuffer.array())); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(new float[] { 1.23F }); System.out.println(Arrays.toString(floatBuffer.array())); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);//from w ww .j a v a2s . c o m floatBuffer.rewind(); float[] floatArray = new float[10]; floatBuffer.get(floatArray); System.out.println(Arrays.toString(floatArray)); }
From source file:Main.java
public static void main(String[] args) { FloatBuffer floatBuffer = FloatBuffer.allocate(10); floatBuffer.put(0, 1.23F);/*from ww w.j av a2s.c o m*/ floatBuffer.rewind(); float[] floatArray = new float[10]; floatBuffer.get(floatArray, 0, 3); System.out.println(Arrays.toString(floatArray)); }