List of usage examples for java.nio ShortBuffer array
public final short[] array()
From source file:Main.java
public static void main(String[] args) { ShortBuffer shortBuffer = ShortBuffer.allocate(10); shortBuffer.put((short) 100); shortBuffer.rewind();// www. j av a 2 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 w ww .j a v a 2 s . c o m*/ ShortBuffer shortBuffer2 = shortBuffer.asReadOnlyBuffer(); System.out.println(Arrays.toString(shortBuffer2.array())); }
From source file:Main.java
public static void main(String[] args) { ShortBuffer bb = ShortBuffer.allocate(10); bb.put((short) 100); bb.rewind();//w w w . j ava2 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 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 }); bb.put(0, (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())); }