Skip to content

Commit

Permalink
Use Javadoc tags instead of HTML.
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 17, 2021
1 parent 757c229 commit 1776a8a
Show file tree
Hide file tree
Showing 47 changed files with 148 additions and 148 deletions.
Expand Up @@ -148,7 +148,7 @@ public CpioArchiveInputStream(final InputStream in, final int blockSize) {
* @param encoding
* The encoding of file names to expect - use null for
* the platform's default.
* @throws IllegalArgumentException if <code>blockSize</code> is not bigger than 0
* @throws IllegalArgumentException if {@code blockSize} is not bigger than 0
* @since 1.6
*/
public CpioArchiveInputStream(final InputStream in, final int blockSize, final String encoding) {
Expand Down
Expand Up @@ -246,13 +246,13 @@ public int available() throws IOException {


/**
* Skips over and discards <code>n</code> bytes of data from this input
* stream. The <code>skip</code> method may, for a variety of reasons, end
* up skipping over some smaller number of bytes, possibly <code>0</code>.
* Skips over and discards {@code n} bytes of data from this input
* stream. The {@code skip} method may, for a variety of reasons, end
* up skipping over some smaller number of bytes, possibly {@code 0}.
* This may result from any of a number of conditions; reaching end of file
* or end of entry before <code>n</code> bytes have been skipped; are only
* or end of entry before {@code n} bytes have been skipped; are only
* two possibilities. The actual number of bytes skipped is returned. If
* <code>n</code> is negative, no bytes are skipped.
* {@code n} is negative, no bytes are skipped.
*
*
* @param n
Expand Down
Expand Up @@ -43,9 +43,9 @@ protected AbstractUnicodeExtraField() {
* @param bytes The encoded of the file name or comment in the zip
* file.
* @param off The offset of the encoded file name or comment in
* <code>bytes</code>.
* {@code bytes}.
* @param len The length of the encoded file name or comment in
* <code>bytes</code>.
* {@code bytes}.
*/
protected AbstractUnicodeExtraField(final String text, final byte[] bytes, final int off, final int len) {
final CRC32 crc32 = new CRC32();
Expand Down
Expand Up @@ -100,7 +100,7 @@ public ZipShort getHeaderId() {
/**
* Length of the extra field in the local file data - without
* Header-ID or length specifier.
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getLocalFileDataLength() {
Expand Down
Expand Up @@ -42,9 +42,9 @@ public UnicodeCommentExtraField () {
*
* @param text The file name
* @param bytes the bytes actually written to the archive
* @param off The offset of the encoded comment in <code>bytes</code>.
* @param off The offset of the encoded comment in {@code bytes}.
* @param len The length of the encoded comment or comment in
* <code>bytes</code>.
* {@code bytes}.
*/
public UnicodeCommentExtraField(final String text, final byte[] bytes, final int off,
final int len) {
Expand Down
Expand Up @@ -42,9 +42,9 @@ public UnicodePathExtraField () {
*
* @param text The file name
* @param bytes the bytes actually written to the archive
* @param off The offset of the encoded file name in <code>bytes</code>.
* @param off The offset of the encoded file name in {@code bytes}.
* @param len The length of the encoded file name or comment in
* <code>bytes</code>.
* {@code bytes}.
*/
public UnicodePathExtraField(final String text, final byte[] bytes, final int off, final int len) {
super(text, bytes, off, len);
Expand Down
Expand Up @@ -87,7 +87,7 @@ public ZipShort getHeaderId() {
* Length of the extra field in the local file data - without
* Header-ID or length specifier.
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getLocalFileDataLength() {
Expand All @@ -105,7 +105,7 @@ public ZipShort getLocalFileDataLength() {
* local length, because central cannot contain access or create
* timestamps.</p>
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getCentralDirectoryLength() {
Expand Down
Expand Up @@ -137,7 +137,7 @@ public ZipShort getHeaderId() {
* Length of the extra field in the local file data - without
* Header-ID or length specifier.
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getLocalFileDataLength() {
Expand All @@ -156,7 +156,7 @@ public ZipShort getLocalFileDataLength() {
* local length, because central cannot contain access or create
* timestamps.</p>
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getCentralDirectoryLength() {
Expand Down
Expand Up @@ -131,7 +131,7 @@ public void setGID(final long l) {
* Length of the extra field in the local file data - without
* Header-ID or length specifier.
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getLocalFileDataLength() {
Expand All @@ -148,7 +148,7 @@ public ZipShort getLocalFileDataLength() {
* Length of the extra field in the central directory data - without
* Header-ID or length specifier.
*
* @return a <code>ZipShort</code> for the length of the data of this extra field
* @return a {@code ZipShort} for the length of the data of this extra field
*/
@Override
public ZipShort getCentralDirectoryLength() {
Expand Down
Expand Up @@ -324,7 +324,7 @@ public int getInternalAttributes() {

/**
* Sets the internal file attributes.
* @param value an <code>int</code> value
* @param value an {@code int} value
*/
public void setInternalAttributes(final int value) {
internalAttributes = value;
Expand All @@ -345,7 +345,7 @@ public long getExternalAttributes() {

/**
* Sets the external file attributes.
* @param value an <code>long</code> value
* @param value an {@code long} value
*/
public void setExternalAttributes(final long value) {
externalAttributes = value;
Expand All @@ -354,7 +354,7 @@ public void setExternalAttributes(final long value) {
/**
* Sets Unix permissions in a way that is understood by Info-Zip's
* unzip command.
* @param mode an <code>int</code> value
* @param mode an {@code int} value
*/
public void setUnixMode(final int mode) {
// CheckStyle:MagicNumberCheck OFF - no point
Expand Down Expand Up @@ -401,7 +401,7 @@ public int getPlatform() {

/**
* Set the platform (UNIX or FAT).
* @param platform an <code>int</code> value - 0 is FAT, 3 is UNIX
* @param platform an {@code int} value - 0 is FAT, 3 is UNIX
*/
protected void setPlatform(final int platform) {
this.platform = platform;
Expand Down
Expand Up @@ -1339,7 +1339,7 @@ private class BoundedInputStream extends InputStream {
private long pos;

/**
* Creates a new <code>BoundedInputStream</code> that wraps the given input
* Creates a new {@code BoundedInputStream} that wraps the given input
* stream and limits it to a certain size.
*
* @param in The wrapped input stream
Expand Down
Expand Up @@ -981,7 +981,7 @@ public void setLevel(final int level) {
* Sets the default compression method for subsequent entries.
*
* <p>Default is DEFLATED.</p>
* @param method an <code>int</code> from java.util.zip.ZipEntry
* @param method an {@code int} from java.util.zip.ZipEntry
*/
public void setMethod(final int method) {
this.method = method;
Expand Down
Expand Up @@ -66,7 +66,7 @@ public interface ZipEncoding {
* @return A byte buffer with a backing array containing the
* encoded name. Unmappable characters or malformed
* character sequences are mapped to a sequence of utf-16
* words encoded in the format <code>%Uxxxx</code>. It is
* words encoded in the format {@code %Uxxxx}. It is
* assumed, that the byte buffer is positioned at the
* beginning of the encoded result, the byte buffer has a
* backing array and the limit of the byte buffer points
Expand Down
Expand Up @@ -58,31 +58,31 @@
import static org.apache.commons.compress.archivers.zip.ZipConstants.ZIP64_MAGIC_SHORT;

/**
* Replacement for <code>java.util.ZipFile</code>.
* Replacement for {@code java.util.ZipFile}.
*
* <p>This class adds support for file name encodings other than UTF-8
* (which is required to work on ZIP files created by native zip tools
* and is able to skip a preamble like the one found in self
* extracting archives. Furthermore it returns instances of
* <code>org.apache.commons.compress.archivers.zip.ZipArchiveEntry</code>
* instead of <code>java.util.zip.ZipEntry</code>.</p>
* {@code org.apache.commons.compress.archivers.zip.ZipArchiveEntry}
* instead of {@code java.util.zip.ZipEntry}.</p>
*
* <p>It doesn't extend <code>java.util.zip.ZipFile</code> as it would
* <p>It doesn't extend {@code java.util.zip.ZipFile} as it would
* have to reimplement all methods anyway. Like
* <code>java.util.ZipFile</code>, it uses SeekableByteChannel under the
* {@code java.util.ZipFile}, it uses SeekableByteChannel under the
* covers and supports compressed and uncompressed entries. As of
* Apache Commons Compress 1.3 it also transparently supports Zip64
* extensions and thus individual entries and archives larger than 4
* GB or with more than 65536 entries.</p>
*
* <p>The method signatures mimic the ones of
* <code>java.util.zip.ZipFile</code>, with a couple of exceptions:
* {@code java.util.zip.ZipFile}, with a couple of exceptions:
*
* <ul>
* <li>There is no getName method.</li>
* <li>entries has been renamed to getEntries.</li>
* <li>getEntries and getEntry return
* <code>org.apache.commons.compress.archivers.zip.ZipArchiveEntry</code>
* {@code org.apache.commons.compress.archivers.zip.ZipArchiveEntry}
* instances.</li>
* <li>close is allowed to throw IOException.</li>
* </ul>
Expand Down
Expand Up @@ -37,8 +37,8 @@ public abstract class ZipUtil {

/**
* Convert a Date object to a DOS date/time field.
* @param time the <code>Date</code> to convert
* @return the date as a <code>ZipLong</code>
* @param time the {@code Date} to convert
* @return the date as a {@code ZipLong}
*/
public static ZipLong toDosTime(final Date time) {
return new ZipLong(toDosTime(time.getTime()));
Expand All @@ -47,7 +47,7 @@ public static ZipLong toDosTime(final Date time) {
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* <p>Stolen from InfoZip's {@code fileio.c}</p>
* @param t number of milliseconds since the epoch
* @return the date as a byte array
*/
Expand All @@ -60,7 +60,7 @@ public static byte[] toDosTime(final long t) {
/**
* Convert a Date object to a DOS date/time field.
*
* <p>Stolen from InfoZip's <code>fileio.c</code></p>
* <p>Stolen from InfoZip's {@code fileio.c}</p>
* @param t number of milliseconds since the epoch
* @param buf the output buffer
* @param offset
Expand Down
Expand Up @@ -351,7 +351,7 @@ public static int chooseBlockSize(final long inputLength) {
* @throws IOException
* if an I/O error occurs in the specified stream.
* @throws NullPointerException
* if <code>out == null</code>.
* if {@code out == null}.
*/
public BZip2CompressorOutputStream(final OutputStream out)
throws IOException {
Expand All @@ -369,9 +369,9 @@ public BZip2CompressorOutputStream(final OutputStream out)
* @throws IOException
* if an I/O error occurs in the specified stream.
* @throws IllegalArgumentException
* if <code>(blockSize &lt; 1) || (blockSize &gt; 9)</code>.
* if {@code (blockSize &lt; 1) || (blockSize &gt; 9)}.
* @throws NullPointerException
* if <code>out == null</code>.
* if {@code out == null}.
*
* @see #MIN_BLOCKSIZE
* @see #MAX_BLOCKSIZE
Expand Down
Expand Up @@ -65,7 +65,7 @@ public void write(final byte[] buf, final int off, final int len) throws IOExcep
}

/**
* Flushes the encoder and calls <code>outputStream.flush()</code>.
* Flushes the encoder and calls {@code outputStream.flush()}.
* All buffered pending data will then be decompressible from
* the output stream. Calling this function very often may increase
* the compressed file size a lot.
Expand Down
Expand Up @@ -53,7 +53,7 @@
* </p>
*
* <p>
* Instead of using <code>GZIPInputStream</code>, this class has its own .gz
* Instead of using {@code GZIPInputStream}, this class has its own .gz
* container format decoder. The actual decompression is done with
* {@link java.util.zip.Inflater}.
* </p>
Expand Down Expand Up @@ -119,7 +119,7 @@ public class GzipCompressorInputStream extends CompressorInputStream
* from the specified input stream.
* <p>
* This is equivalent to
* <code>GzipCompressorInputStream(inputStream, false)</code> and thus
* {@code GzipCompressorInputStream(inputStream, false)} and thus
* will not decompress concatenated .gz files.
*
* @param inputStream the InputStream from which this object should
Expand All @@ -136,12 +136,12 @@ public GzipCompressorInputStream(final InputStream inputStream)
* Constructs a new input stream that decompresses gzip-compressed data
* from the specified input stream.
* <p>
* If <code>decompressConcatenated</code> is {@code false}:
* If {@code decompressConcatenated} is {@code false}:
* This decompressor might read more input than it will actually use.
* If <code>inputStream</code> supports <code>mark</code> and
* <code>reset</code>, then the input position will be adjusted
* If {@code inputStream} supports {@code mark} and
* {@code reset}, then the input position will be adjusted
* so that it is right after the last byte of the compressed stream.
* If <code>mark</code> isn't supported, the input position will be
* If {@code mark} isn't supported, the input position will be
* undefined.
*
* @param inputStream the InputStream from which this object should
Expand Down
Expand Up @@ -227,10 +227,10 @@ protected final boolean hasMoreDataInBlock() {
* @throws IOException if the underlying stream throws or signals
* an EOF before the amount of data promised for the block have
* been read
* @throws NullPointerException if <code>b</code> is null
* @throws IndexOutOfBoundsException if <code>off</code> is
* negative, <code>len</code> is negative, or <code>len</code> is
* greater than <code>b.length - off</code>
* @throws NullPointerException if {@code b} is null
* @throws IndexOutOfBoundsException if {@code off} is
* negative, {@code len} is negative, or {@code len} is
* greater than {@code b.length - off}
*/
protected final int readLiteral(final byte[] b, final int off, final int len) throws IOException {
final int avail = available();
Expand Down Expand Up @@ -301,10 +301,10 @@ protected final void startBackReference(final int offset, final long length) {
* @param len maximum amount of data to read
* @return number of bytes read, may be 0. Will never return -1 as
* EOF-detection is the responsibility of the subclass
* @throws NullPointerException if <code>b</code> is null
* @throws IndexOutOfBoundsException if <code>off</code> is
* negative, <code>len</code> is negative, or <code>len</code> is
* greater than <code>b.length - off</code>
* @throws NullPointerException if {@code b} is null
* @throws IndexOutOfBoundsException if {@code off} is
* negative, {@code len} is negative, or {@code len} is
* greater than {@code b.length - off}
*/
protected final int readBackReference(final byte[] b, final int off, final int len) {
final int avail = available();
Expand Down

0 comments on commit 1776a8a

Please sign in to comment.