Example usage for java.nio FloatBuffer put

List of usage examples for java.nio FloatBuffer put

Introduction

In this page you can find the example usage for java.nio FloatBuffer put.

Prototype

public abstract FloatBuffer put(int index, float f);

Source Link

Document

Writes a float to the specified index of this buffer; the position is not changed.

Usage

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 1.23F);

    System.out.println(floatBuffer.hashCode());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 1.23F);

    System.out.println(floatBuffer.toString());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 1.23F);

    System.out.println(floatBuffer.hasArray());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 1.23F);

    System.out.println(floatBuffer.isDirect());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 1.23F);

    System.out.println(floatBuffer.order());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(1, 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);

    floatBuffer.rewind();/*from   w ww  .ja v a  2  s. co m*/

    System.out.println(floatBuffer.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);

    floatBuffer.rewind();// w  ww. j  a  va  2  s  . co  m

    System.out.println(floatBuffer.get());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);

    floatBuffer.rewind();/*w w  w. j  a v  a2 s. c  om*/

    System.out.println(floatBuffer.get(0));

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);

    floatBuffer.rewind();//from   w  w  w.ja  va  2s  . co m

    FloatBuffer floatBuffer1 = floatBuffer.asReadOnlyBuffer();

    System.out.println(floatBuffer.equals(floatBuffer1));

}