Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Feb 4, 2025
1 parent 0df4e0f commit 61fc970
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<>();
Expand Down Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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.")
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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.")
Expand All @@ -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 {
Expand All @@ -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 {
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 61fc970

Please sign in to comment.