public void stateLoad(ByteBuffer buf) { if (mem == null) mem = new short[memLength]; buf.readByteArray(mem); }