Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 12, 2024
1 parent 535b2a5 commit 4d8f3cf
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.file.Path;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Objects;
Expand All @@ -30,6 +31,7 @@
import java.util.jar.JarOutputStream;

import org.apache.commons.compress.harmony.archive.internal.nls.Messages;
import org.apache.commons.io.input.BoundedInputStream;

/**
* Class factory for {@link Pack200.Packer} and {@link Pack200.Unpacker}.
Expand Down Expand Up @@ -137,14 +139,14 @@ public interface Packer {
String UNKNOWN_ATTRIBUTE = "pack.unknown.attribute";//$NON-NLS-1$

/**
* Add a listener for PropertyChange events
* Adds a listener for PropertyChange events
*
* @param listener the listener to listen if PropertyChange events occurs
*/
void addPropertyChangeListener(PropertyChangeListener listener);

/**
* Pack the specified JAR file to the specified output stream.
* Packs the specified JAR file to the specified output stream.
*
* @param in JAR file to be compressed.
* @param out stream of compressed data.
Expand All @@ -153,7 +155,7 @@ public interface Packer {
void pack(JarFile in, OutputStream out) throws IOException;

/**
* Pack the data from the specified jar input stream to the specified output stream.
* Packs the data from the specified jar input stream to the specified output stream.
*
* @param in stream of uncompressed JAR data.
* @param out stream of compressed data.
Expand All @@ -162,14 +164,14 @@ public interface Packer {
void pack(JarInputStream in, OutputStream out) throws IOException;

/**
* Returns a sorted map of the properties of this packer.
* Gets a sorted map of the properties of this packer.
*
* @return the properties of the packer.
*/
SortedMap<String, String> properties();

/**
* remove a listener
* Removes a listener
*
* @param listener listener to remove
*/
Expand Down Expand Up @@ -207,28 +209,28 @@ public interface Unpacker {
String TRUE = "true";//$NON-NLS-1$

/**
* add a listener for {@code PropertyChange} events.
* Adds a listener for {@code PropertyChange} events.
*
* @param listener the listener to listen if {@code PropertyChange} events occurs.
*/
void addPropertyChangeListener(PropertyChangeListener listener);

/**
* Returns a sorted map of the properties of this unpacker.
* Gets a sorted map of the properties of this unpacker.
*
* @return the properties of unpacker.
*/
SortedMap<String, String> properties();

/**
* remove a listener.
* Removes a listener.
*
* @param listener listener to remove.
*/
void removePropertyChangeListener(PropertyChangeListener listener);

/**
* Unpack the contents of the specified {@code File} to the specified JAR output stream.
* Unpacks the contents of the specified {@code File} to the specified JAR output stream.
*
* @param in file to be uncompressed.
* @param out JAR output stream of uncompressed data.
Expand All @@ -237,13 +239,16 @@ public interface Unpacker {
void unpack(File in, JarOutputStream out) throws IOException;

/**
* Unpack the specified stream to the specified JAR output stream.
* Unpacks the specified stream to the specified JAR output stream.
*
* @param in stream to uncompressed.
* @param out JAR output stream of uncompressed data.
* @throws IOException if I/O exception occurs.
* @deprecated Use {@link #unpack(Path, BoundedInputStream, JarOutputStream)}.
*/
@Deprecated
void unpack(InputStream in, JarOutputStream out) throws IOException;

}

/**
Expand Down Expand Up @@ -299,7 +304,7 @@ public static Pack200.Unpacker newUnpacker() {
}

/**
* Prevent this class from being instantiated.
* Prevents this class from being instantiated.
*/
private Pack200() {
// do nothing
Expand Down

0 comments on commit 4d8f3cf

Please sign in to comment.