private byte[] writeDataIndex(DataIndex dataIndex) throws IOException, XmlException {
        try {
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            getPersister().write(dataIndex, outputStream, "UTF-8");
            return outputStream.toByteArray();
        }
        catch (Exception ex) {
            throw new XmlException(ex);
        }
    }