@Override
        public void writeTo(Output output, int number, short[] value,
                boolean repeated) throws IOException
        {
            writes++;

            byte[] buffer = new byte[value.length * 2];
            for (int i = 0, offset = 0; i < value.length; i++)
            {
                short s = value[i];
                buffer[offset++] = (byte) ((s >>> 8) & 0xFF);
                buffer[offset++] = (byte) ((s >>> 0) & 0xFF);
            }

            output.writeByteArray(number, buffer, repeated);
        }
Sample delegates for testing.

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