Example usage for org.apache.commons.compress.archivers.tar TarArchiveEntry getUserId

List of usage examples for org.apache.commons.compress.archivers.tar TarArchiveEntry getUserId

Introduction

In this page you can find the example usage for org.apache.commons.compress.archivers.tar TarArchiveEntry getUserId.

Prototype

public int getUserId() 

Source Link

Document

Get this entry's user id.

Usage

From source file:org.vafer.jdeb.producers.Producers.java

/**
 * Feeds input stream to data consumer using metadata from tar entry.
 * @param consumer the consumer// w  w w .  j a va  2s .  c  o m
 * @param inputStream the stream to feed
 * @param entry the entry to use for metadata
 * @throws IOException on consume error
 */
static void produceInputStreamWithEntry(final DataConsumer consumer, final InputStream inputStream,
        final TarArchiveEntry entry) throws IOException {
    try {
        consumer.onEachFile(inputStream, entry.getName(), entry.getLinkName(), entry.getUserName(),
                entry.getUserId(), entry.getGroupName(), entry.getGroupId(), entry.getMode(), entry.getSize());
    } finally {
        IOUtils.closeQuietly(inputStream);
    }
}