package java.nio; public abstract class ShortBuffer extends Buffer { private ByteOrder endian = ByteOrder.BIG_ENDIAN; public static ShortBuffer allocateDirect(int capacity) { ShortBuffer b = new gnu.java.nio. ShortBufferImpl(capacity, 0, capacity); return b; } public static ShortBuffer allocate(int capacity) { ShortBuffer b = new gnu.java.nio. ShortBufferImpl(capacity, 0, capacity); return b; } final public static ShortBuffer wrap(short[] array, int offset, int length) { gnu.java.nio.ShortBufferImpl b = new gnu.java.nio. ShortBufferImpl(array, offset, length); return b; } final public static ShortBuffer wrap(String a) { int len = a.length(); short[] buffer = new short[len]; for (int i=0;i