Java tutorial
import java.nio.ShortBuffer; public class Main { public static void main(String[] args) { ShortBuffer bb = ShortBuffer.allocate(10); bb.put((short) 100); bb.rewind(); System.out.println(bb.get(0)); } }