This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push:
new 61fc97003 Javadoc
61fc97003 is described below
commit 61fc97003cbba82a6c86811048ad7d066e267e83
Author: Gary Gregory <[email protected]>
AuthorDate: Tue Feb 4 13:02:31 2025 -0500
Javadoc
---
.../archivers/tar/TarArchiveInputStream.java | 4 +-
.../archivers/tar/TarArchiveOutputStream.java | 2 +-
.../commons/compress/archivers/tar/TarFile.java | 2 +-
.../commons/compress/archivers/tar/TarUtils.java | 2 +-
.../archivers/zip/ExplodingInputStream.java | 2 +-
.../archivers/zip/ZipSplitOutputStream.java | 14 +++----
.../zip/ZipSplitReadOnlySeekableByteChannel.java | 2 +-
.../bzip2/BZip2CompressorInputStream.java | 2 +-
.../harmony/unpack200/Pack200UnpackerAdapter.java | 4 +-
.../org/apache/commons/compress/AbstractTest.java | 2 +-
.../compress/archivers/ar/Compress678Test.java | 2 +-
.../brotli/BrotliCompressorInputStreamTest.java | 2 +-
.../zstandard/ZstdCompressorInputStreamTest.java | 2 +-
.../compress/harmony/unpack200/BcBandsTest.java | 44 +++++++++++-----------
14 files changed, 43 insertions(+), 43 deletions(-)
diff --git
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
index 66d0c3486..2ea2119cf 100644
---
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
+++
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
@@ -580,7 +580,7 @@ public boolean markSupported() {
* map entries, each one consisting of two numbers giving the offset and
size of the data block it describes.
* </p>
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void paxHeaders() throws IOException {
List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
@@ -838,7 +838,7 @@ private void skipRecordPadding() throws IOException {
*
* @param n bytes of data to skip
* @return actual bytes of data skipped
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private long skipSparse(final long n) throws IOException {
if (sparseInputStreams == null || sparseInputStreams.isEmpty()) {
diff --git
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
index e58e4e579..b423756ff 100644
---
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
+++
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java
@@ -420,7 +420,7 @@ public int getCount() {
* Gets the record size being used by this stream's TarBuffer.
*
* @return The TarBuffer record size.
- * @deprecated
+ * @deprecated TODO Add a comment.
*/
@Deprecated
public int getRecordSize() {
diff --git
a/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
b/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
index c01f22112..43b01d4e3 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java
@@ -585,7 +585,7 @@ private boolean isEOFRecord(final ByteBuffer headerBuf) {
* The map is padded with nulls to the nearest block boundary. The first
number gives the number of entries in the map. Following are map entries, each
one
* consisting of two numbers giving the offset and size of the data block
it describes.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void paxHeaders() throws IOException {
List<TarArchiveStructSparse> sparseHeaders = new ArrayList<>();
diff --git
a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
index 3d24c942a..3b2b5be88 100644
--- a/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
+++ b/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java
@@ -761,7 +761,7 @@ public static TarArchiveStructSparse parseSparse(final
byte[] buffer, final int
*
* @param inputStream the input stream of the tar file
* @return the decimal number delimited by '\n', and the bytes read from
input stream
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private static long[] readLineOfNumberForPax1X(final InputStream
inputStream) throws IOException {
int number;
diff --git
a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
index df1c0d516..80c20fadd 100644
---
a/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
+++
b/src/main/java/org/apache/commons/compress/archivers/zip/ExplodingInputStream.java
@@ -169,7 +169,7 @@ public long getUncompressedCount() {
/**
* Reads the encoded binary trees and prepares the bit stream.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void init() throws IOException {
if (bits == null) {
diff --git
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
index 5f9c6f26c..21ab2cd2c 100644
---
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
+++
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitOutputStream.java
@@ -132,7 +132,7 @@ public void close() throws IOException {
*
* @param zipSplitSegmentSuffixIndex
* @return
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private Path createNewSplitSegmentFile(final Integer
zipSplitSegmentSuffixIndex) throws IOException {
final Path newFile =
getSplitSegmentFileName(zipSplitSegmentSuffixIndex);
@@ -146,7 +146,7 @@ private Path createNewSplitSegmentFile(final Integer
zipSplitSegmentSuffixIndex)
/**
* The last ZIP split segment's suffix should be .zip
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void finish() throws IOException {
if (finished) {
@@ -185,7 +185,7 @@ private Path getSplitSegmentFileName(final Integer
zipSplitSegmentSuffixIndex) {
/**
* Creates a new ZIP split segment and prepare to write to the new segment
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void openNewSplitSegment() throws IOException {
Path newFile;
@@ -221,8 +221,8 @@ public long position() {
* </p>
*
* @param unsplittableContentSize
- * @throws IllegalArgumentException
- * @throws IOException
+ * @throws IllegalArgumentException if unsplittable content size is bigger
than the split segment size.
+ * @throws IOException if an I/O error occurs.
*/
public void prepareToWriteUnsplittableContent(final long
unsplittableContentSize) throws IllegalArgumentException, IOException {
if (unsplittableContentSize > this.splitSize) {
@@ -246,7 +246,7 @@ public void write(final byte[] b) throws IOException {
* @param b data to write
* @param off offset of the start of data in param b
* @param len the length of data to write
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Override
public void write(final byte[] b, final int off, final int len) throws
IOException {
@@ -316,7 +316,7 @@ private void writeToSegment(
/**
* Writes the ZIP split signature (0x08074B50) to the head of the first
ZIP split segment
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void writeZipSplitSignature() throws IOException {
outputStream.write(ZipArchiveOutputStream.DD_SIG);
diff --git
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
index dcb4b7152..9deff11f5 100644
---
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
+++
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipSplitReadOnlySeekableByteChannel.java
@@ -272,7 +272,7 @@ public ZipSplitReadOnlySeekableByteChannel(final
List<SeekableByteChannel> chann
* </p>
*
* @param channels channels to be validated
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private void assertSplitSignature(final List<SeekableByteChannel>
channels) throws IOException {
final SeekableByteChannel channel = channels.get(0);
diff --git
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
index c9fbab7da..fbecf3c92 100644
---
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
+++
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java
@@ -133,7 +133,7 @@ private static char bsGetUByte(final BitInputStream bin)
throws IOException {
*
* @param n the number of bits to read, must not exceed 32?
* @return the requested bits combined into an int
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
private static int bsR(final BitInputStream bin, final int n) throws
IOException {
final long thech = bin.readBits(n);
diff --git
a/src/main/java/org/apache/commons/compress/harmony/unpack200/Pack200UnpackerAdapter.java
b/src/main/java/org/apache/commons/compress/harmony/unpack200/Pack200UnpackerAdapter.java
index 0e5f10058..c85dc7050 100644
---
a/src/main/java/org/apache/commons/compress/harmony/unpack200/Pack200UnpackerAdapter.java
+++
b/src/main/java/org/apache/commons/compress/harmony/unpack200/Pack200UnpackerAdapter.java
@@ -125,8 +125,8 @@ static BoundedInputStream newBoundedInputStream(final
String first, final String
*
* @param url The URL.
* @return a new BoundedInputStream
- * @throws IOException if an I/O error occurs
- * @throws URISyntaxException
+ * @throws IOException if an I/O error occurs.
+ * @throws URISyntaxException if the URL is not formatted strictly
according to to RFC2396 and cannot be converted to a URI.
*/
static BoundedInputStream newBoundedInputStream(final URL url) throws
IOException, URISyntaxException {
return newBoundedInputStream(Paths.get(url.toURI()));
diff --git a/src/test/java/org/apache/commons/compress/AbstractTest.java
b/src/test/java/org/apache/commons/compress/AbstractTest.java
index c693c1f1b..e8d420963 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTest.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTest.java
@@ -118,7 +118,7 @@ public static byte[] readAllBytes(final String path) throws
IOException {
* @param outputStream
* @param fileName
* @param inputFile
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
* @throws FileNotFoundException
*/
private <O extends ArchiveOutputStream<E>, E extends ArchiveEntry> void
addArchiveEntry(final O outputStream, final String fileName, final File
inputFile)
diff --git
a/src/test/java/org/apache/commons/compress/archivers/ar/Compress678Test.java
b/src/test/java/org/apache/commons/compress/archivers/ar/Compress678Test.java
index e15d7c315..31b3153c2 100644
---
a/src/test/java/org/apache/commons/compress/archivers/ar/Compress678Test.java
+++
b/src/test/java/org/apache/commons/compress/archivers/ar/Compress678Test.java
@@ -48,7 +48,7 @@ public void test_LONGFILE_BSD(final int fileNameLen) throws
IOException {
/**
* @param fileName
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
* @throws FileNotFoundException
*/
private void test_LONGFILE_BSD(final String fileName) throws IOException,
FileNotFoundException {
diff --git
a/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
b/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
index 19a5a8810..8d53f5c50 100644
---
a/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
+++
b/src/test/java/org/apache/commons/compress/compressors/brotli/BrotliCompressorInputStreamTest.java
@@ -48,7 +48,7 @@ public void testAvailableShouldReturnZero() throws
IOException {
/**
* Tests bridge.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBrotliDecode() throws IOException {
diff --git
a/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
b/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
index d4e4e2daf..4a228d656 100644
---
a/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
+++
b/src/test/java/org/apache/commons/compress/compressors/zstandard/ZstdCompressorInputStreamTest.java
@@ -135,7 +135,7 @@ public void testZstandardUnarchive() throws Exception {
/**
* Test bridge works fine.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testZstdDecode() throws IOException {
diff --git
a/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
b/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
index cfe54f765..fadbfa28e 100644
---
a/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
+++
b/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
@@ -256,7 +256,7 @@ protected CpBands getCpBands() {
* Test with codes that should require entries in the bc_byte band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcByteBand() throws IOException, Pack200Exception {
@@ -279,7 +279,7 @@ public void testBcByteBand() throws IOException,
Pack200Exception {
* Test with codes that require entries in the bc_case_count and
bc_case_value bands
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcCaseBands() throws IOException, Pack200Exception {
@@ -303,7 +303,7 @@ public void testBcCaseBands() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_classref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcClassRefBand() throws IOException, Pack200Exception {
@@ -320,7 +320,7 @@ public void testBcClassRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_doubleref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcDoubleRefBand() throws IOException, Pack200Exception {
@@ -349,7 +349,7 @@ public void testBcEscRefBands() {
* Test with codes that should require entries in the bc_fieldref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcFieldRefBand() throws IOException, Pack200Exception {
@@ -365,7 +365,7 @@ public void testBcFieldRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_floatref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcFloatRefBand() throws IOException, Pack200Exception {
@@ -382,7 +382,7 @@ public void testBcFloatRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_imethodref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcIMethodRefBand() throws IOException, Pack200Exception {
@@ -399,7 +399,7 @@ public void testBcIMethodRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_initrefref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
@Disabled("TODO: Need to fix this test so it has enough data to pass.")
@@ -416,7 +416,7 @@ public void testBcInitRefRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_intref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcIntRefBand() throws IOException, Pack200Exception {
@@ -433,7 +433,7 @@ public void testBcIntRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_label band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcLabelBand() throws IOException, Pack200Exception {
@@ -463,7 +463,7 @@ public void testBcLabelBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_local band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcLocalBand() throws IOException, Pack200Exception {
@@ -479,7 +479,7 @@ public void testBcLocalBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_longref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcLongRefBand() throws IOException, Pack200Exception {
@@ -495,7 +495,7 @@ public void testBcLongRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_methodref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcMethodRefBand() throws IOException, Pack200Exception {
@@ -511,7 +511,7 @@ public void testBcMethodRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_short band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcShortBand() throws IOException, Pack200Exception {
@@ -529,7 +529,7 @@ public void testBcShortBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_stringref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcStringRefBand() throws IOException, Pack200Exception {
@@ -546,7 +546,7 @@ public void testBcStringRefBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_superfield band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcSuperFieldBand() throws IOException, Pack200Exception {
@@ -563,7 +563,7 @@ public void testBcSuperFieldBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_supermethod band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
@Disabled("TODO: Need to fix this test so it has enough data to pass.")
@@ -580,7 +580,7 @@ public void testBcSuperMethodBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_thisfieldref band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcThisFieldBand() throws IOException, Pack200Exception {
@@ -597,7 +597,7 @@ public void testBcThisFieldBand() throws IOException,
Pack200Exception {
* Test with codes that should require entries in the bc_thismethod band
*
* @throws Pack200Exception
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
*/
@Test
public void testBcThisMethodBand() throws IOException, Pack200Exception {
@@ -612,7 +612,7 @@ public void testBcThisMethodBand() throws IOException,
Pack200Exception {
/**
* Test with multiple classes but single byte instructions
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
* @throws Pack200Exception
*/
@Test
@@ -632,7 +632,7 @@ public void testMultipleClassesSimple() throws IOException,
Pack200Exception {
/**
* Test with multiple classes and multiple methods but single byte
instructions
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
* @throws Pack200Exception
*/
@Test
@@ -652,7 +652,7 @@ public void testMultipleMethodsSimple() throws IOException,
Pack200Exception {
/**
* Test with single byte instructions that mean all other bands apart from
bc_codes will be empty.
*
- * @throws IOException
+ * @throws IOException if an I/O error occurs.
* @throws Pack200Exception
*/
@Test