package xmlconvertor;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import java.io.IOException;
/**
* Created by IntelliJ IDEA.
* User: diez
* Date: 1/7/11
* Time: 9:40 PM
* To change this template use File | Settings | File Templates.
*/
public class TarEntryGenerator {
public static void generateTarArchiveEntry(TarArchiveOutputStream tOut, byte[] fileContent, String entryName) throws IOException {
TarArchiveEntry tarEntry = new TarArchiveEntry(entryName);
tarEntry.setSize(fileContent.length);
tOut.putArchiveEntry(tarEntry);
tOut.write(fileContent);
tOut.closeArchiveEntry();
}}