public void testFooTooLarge() throws Exception
    {
        Schema<Foo> schema = Foo.getSchema();
        Foo message = SerializableObjects.newFoo(
                new Integer[] { 90210, -90210, 0, 128 },
                new String[] { "ab", "cd" },
                new Bar[] { SerializableObjects.bar, SerializableObjects.negativeBar },
                new EnumSample[] { EnumSample.TYPE0, EnumSample.TYPE2 },
                new ByteString[] { ByteString.copyFromUtf8("ef"), ByteString.copyFromUtf8("gh") },
                new Boolean[] { true, false },
                new Float[] { 1234.4321f, -1234.4321f, 0f },
                new Double[] { 12345678.87654321d, -12345678.87654321d, 0d },
                new Long[] { 7060504030201l, -7060504030201l, 0l });

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        int size = optWriteDelimitedTo(out, message, schema, buf());
        int delimSize = ProtobufOutput.computeRawVarint32Size(size);
        byte[] data = out.toByteArray();

        int expectedSize = size + delimSize; // 258
        assertEquals(expectedSize, data.length);
        verifyOptData(data, message, schema, buf());

        ByteArrayInputStream in = new ByteArrayInputStream(data);

        Foo parsedMessage = schema.newMessage();
        boolean merged = optMergeDelimitedFrom(in, parsedMessage, schema, buf(256));
        assertFalse(merged);
    }
Deserializes from the byte array and data is merged/saved to the message.
protostuff-core/src/test/java/io/protostuff/DelimiterTest.java