@Override
    protected <T> void mergeFrom(byte[] data, int offset, int length,
            T message, Schema<T> schema) throws IOException
    {
        ByteArrayInputStream in = new ByteArrayInputStream(data, offset, length);
        try
        {
            schema.mergeFrom(new KvpInput(in, numeric), message);
        }
        catch (ArrayIndexOutOfBoundsException e)
        {
            throw new ProtostuffException("Truncated message.", e);
        }
    }
Test for reading/writing from stream.

@author David Yu
@created Dec 4, 2010
protostuff-kvp/src/test/java/io/protostuff/AbstractKvpStreamTest.java