@Override
        public short[] readFrom(Input input) throws IOException
        {
            reads++;

            byte[] buffer = input.readByteArray();
            short[] s = new short[buffer.length / 2];
            for (int i = 0, offset = 0; i < s.length; i++)
            {
                s[i] = (short) ((buffer[offset++] & 0xFF) << 8 | (buffer[offset++] & 0xFF));
            }

            return s;
        }
Sample delegates for testing.

@author David Yu
@created May 2, 2012
protostuff-runtime/src/test/java/io/protostuff/runtime/SampleDelegates.java