thrau / jarchivelib

A simple archiving and compression library for Java
https://github.com/thrau/jarchivelib
Apache License 2.0
198 stars 36 forks source link

Provide an ability to pass custom Archiver to ArchiverCompressorDecorator #56

Open hvarakhobava opened 7 years ago

hvarakhobava commented 7 years ago

Hi,

It is very desirable to have an ability to pass own implementation of Archiver interface to ArchiverCompressorDecorator. Since the last one is package-private, please either make it public or make a new static factory method in ArchiverFactory as follow:

public static Archiver createArchiver(Archiver archiver, CompressionType compression) { // do stuff }

thrau commented 7 years ago

ArchiverCompressorDecorator only take CommonsArchiver instances, which are also package private. I don't see much harm in making the classes public, but jarchivelib wasn't designed to be open to extensions and alternative archive providers, which is why the API exposure is minimal.