Search in sources :

Example 6 with RepoDumpException

use of com.enonic.xp.repo.impl.dump.RepoDumpException in project xp by enonic.

the class AbstractDumpWriter method storeTarEntry.

public void storeTarEntry(final byte[] serializedEntry, final String entryName) {
    try {
        final TarArchiveEntry entry = new TarArchiveEntry(entryName);
        entry.setSize(serializedEntry.length);
        tarOutputStream.putArchiveEntry(entry);
        tarOutputStream.write(serializedEntry);
        tarOutputStream.closeArchiveEntry();
    } catch (IOException e) {
        throw new RepoDumpException("Could not write dump-entry", e);
    }
}
Also used : RepoDumpException(com.enonic.xp.repo.impl.dump.RepoDumpException) IOException(java.io.IOException) TarArchiveEntry(org.apache.commons.compress.archivers.tar.TarArchiveEntry)

Aggregations

RepoDumpException (com.enonic.xp.repo.impl.dump.RepoDumpException)6 IOException (java.io.IOException)4 TarArchiveEntry (org.apache.commons.compress.archivers.tar.TarArchiveEntry)3 BlobRecord (com.enonic.xp.blob.BlobRecord)2 Segment (com.enonic.xp.blob.Segment)2 TarArchiveInputStream (org.apache.commons.compress.archivers.tar.TarArchiveInputStream)2 UncheckedIOException (java.io.UncheckedIOException)1 GZIPOutputStream (java.util.zip.GZIPOutputStream)1 TarArchiveOutputStream (org.apache.commons.compress.archivers.tar.TarArchiveOutputStream)1