You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2024/04/25 13:57:00 UTC
[jira] [Updated] (COMPRESS-636) Add Builder Class for TarEntry
[ https://issues.apache.org/jira/browse/COMPRESS-636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated COMPRESS-636:
-------------------------------------
Description:
When looking at the TAR documentation, the suggested usage is:
{code:java}
TarArchiveEntry entry = new TarArchiveEntry(name);
entry.setSize(size);
tarOutput.putArchiveEntry(entry);
tarOutput.write(contentOfEntry);
tarOutput.closeArchiveEntry();{code}
[https://commons.apache.org/proper/commons-compress/examples.html]
In this use case, it would be nice if the TarArchiveEntry class took a _size_ parameter as part of the constructor, but even better would be a Builder class for general ArchiveEntry creation.
For example:
{code:java}
ArchiveEntryBuilder.builder().setName(name).setSize(size).build() {code}
One could imagine a different ArchiveEntryBuilder.newXxxArchiveEntry() for each type available in the commons compress package.
was:
When looking at the TAR documentation, the suggested usage is:
{code:java}
TarArchiveEntry entry = new TarArchiveEntry(name);
entry.setSize(size);
tarOutput.putArchiveEntry(entry);
tarOutput.write(contentOfEntry);
tarOutput.closeArchiveEntry();{code}
[https://commons.apache.org/proper/commons-compress/examples.html]
In this use case, it would be nice if the TarArchiveEntry class took a _size_ parameter as part of the constructor, but even better would be a Builder class for general ArchiveEntry creation.
For example:
{code:java}
ArchiveEntryBuilder.newTarArchiveEntry().setName(name).setSize(size).build() {code}
One could imagine a different ArchiveEntryBuilder.newXxxArchiveEntry() for each type available in the commons compress package.
> Add Builder Class for TarEntry
> ------------------------------
>
> Key: COMPRESS-636
> URL: https://issues.apache.org/jira/browse/COMPRESS-636
> Project: Commons Compress
> Issue Type: New Feature
> Reporter: David Mollitor
> Priority: Major
>
> When looking at the TAR documentation, the suggested usage is:
>
> {code:java}
> TarArchiveEntry entry = new TarArchiveEntry(name);
> entry.setSize(size);
> tarOutput.putArchiveEntry(entry);
> tarOutput.write(contentOfEntry);
> tarOutput.closeArchiveEntry();{code}
> [https://commons.apache.org/proper/commons-compress/examples.html]
>
> In this use case, it would be nice if the TarArchiveEntry class took a _size_ parameter as part of the constructor, but even better would be a Builder class for general ArchiveEntry creation.
> For example:
> {code:java}
> ArchiveEntryBuilder.builder().setName(name).setSize(size).build() {code}
> One could imagine a different ArchiveEntryBuilder.newXxxArchiveEntry() for each type available in the commons compress package.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)