code: public PersistedValueData createPersistedCopy(int orderNumber) throws IOException
     {
        if (isByteArray())
        {
           return new ByteArrayPersistedValueData(orderNumber, data);
        }
        else if (spoolFile != null)
        {
           return new StreamPersistedValueData(orderNumber, spoolFile, null, spoolConfig);
        }
        else
        {
           return new StreamPersistedValueData(orderNumber, stream, null, spoolConfig);
        }
     }
docs: {@inheritDoc}