List of usage examples for java.nio ShortBuffer put
public ShortBuffer put(ShortBuffer src)
From source file:Main.java
public static void main(String[] args) { ShortBuffer bb = ShortBuffer.allocate(10); bb.put((short) 100); bb.rewind();//from ww w. j a v a2s . c o m short[] shortArray = new short[10]; bb.get(shortArray, 0, 2); System.out.println(Arrays.toString(shortArray)); }
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 . ja v a2 s.c om*/ ShortBuffer shortBuffer2 = ShortBuffer.allocate(10); shortBuffer2.put(bb); System.out.println(Arrays.toString(shortBuffer2.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();//from www. j a va2 s . c o m ShortBuffer shortBuffer2 = shortBuffer.compact(); System.out.println(Arrays.toString(shortBuffer2.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();/*from ww w . ja v a2 s. c o m*/ ShortBuffer shortBuffer2 = shortBuffer.compact(); System.out.println(shortBuffer2.equals(shortBuffer2)); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();// ww w. ja v a2 s. com ShortBuffer shortBuffer2 = shortBuffer.duplicate(); System.out.println(shortBuffer2.equals(shortBuffer2)); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();//from ww w . java2 s .c o m ShortBuffer shortBuffer2 = shortBuffer.slice(); System.out.println(shortBuffer2.equals(shortBuffer2)); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();//from ww w . j a va 2 s.c om ShortBuffer shortBuffer2 = shortBuffer.asReadOnlyBuffer(); System.out.println(Arrays.toString(shortBuffer2.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();/*from ww w . j a v a 2 s.com*/ ShortBuffer shortBuffer2 = shortBuffer.compact(); System.out.println(shortBuffer2.compareTo(shortBuffer2)); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer bb = ShortBuffer.wrap(new short[] { 0, 1, 2, 3, 4, 5, 6 }); bb.put((short) 100); System.out.println(Arrays.toString(bb.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer bb = ShortBuffer.wrap(new short[] { 0, 1, 2, 3, 4, 5, 6 }, 0, 3); bb.put((short) 100); System.out.println(Arrays.toString(bb.array())); }