Example usage for java.nio ShortBuffer put

List of usage examples for java.nio ShortBuffer put

Introduction

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

Prototype

public ShortBuffer put(ShortBuffer src) 

Source Link

Document

Writes all the remaining shorts of the src short buffer to this buffer's current position, and increases both buffers' position by the number of shorts copied.

Usage

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.hashCode());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put(new short[] { 100, 123 });
    System.out.println(bb.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.order());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.toString());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.hasArray());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.isDirect());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);

    bb.rewind();//from  w  w  w  . j  a  va2s  .  c o  m
    System.out.println(bb.get());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);

    bb.rewind();//from   w ww .  j a va 2  s. c  o  m
    System.out.println(bb.get(0));

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);

    bb.rewind();/*from   w  w  w  .j a  va2  s . c o m*/

    short[] shortArray = new short[10];
    bb.get(shortArray);

    System.out.println(Arrays.toString(shortArray));

}