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 1b3f112 Javadoc: Use "file name" instead of "filename". Camel case vars "filename" to "fileName". 1b3f112 is described below commit 1b3f112b52d8fdcbfd3bdef9040def01c15f4c5d Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Thu May 30 14:48:21 2019 -0400 Javadoc: Use "file name" instead of "filename". Camel case vars "filename" to "fileName". --- .../archivers/ar/ArArchiveInputStream.java | 10 +-- .../compress/archivers/cpio/CpioArchiveEntry.java | 10 +-- .../archivers/cpio/CpioArchiveInputStream.java | 2 +- .../archivers/cpio/CpioArchiveOutputStream.java | 2 +- .../compress/archivers/dump/DumpArchiveEntry.java | 8 +-- .../archivers/dump/DumpArchiveInputStream.java | 2 +- .../compress/archivers/sevenz/SevenZFile.java | 74 +++++++++++----------- .../archivers/sevenz/SevenZOutputFile.java | 6 +- .../archivers/zip/AbstractUnicodeExtraField.java | 12 ++-- .../compress/archivers/zip/AsiExtraField.java | 4 +- .../compress/archivers/zip/GeneralPurposeBit.java | 2 +- .../archivers/zip/UnicodePathExtraField.java | 4 +- .../archivers/zip/ZipArchiveInputStream.java | 2 +- .../archivers/zip/ZipArchiveOutputStream.java | 14 ++-- .../compress/archivers/zip/ZipEncoding.java | 10 +-- .../compress/archivers/zip/ZipEncodingHelper.java | 2 +- .../commons/compress/archivers/zip/ZipFile.java | 10 +-- .../apache/commons/compress/changes/Change.java | 10 +-- .../apache/commons/compress/changes/ChangeSet.java | 10 +-- .../commons/compress/changes/ChangeSetResults.java | 24 +++---- .../commons/compress/compressors/FileNameUtil.java | 48 +++++++------- .../compress/compressors/bzip2/BZip2Utils.java | 30 ++++----- .../gzip/GzipCompressorOutputStream.java | 2 +- .../compress/compressors/gzip/GzipParameters.java | 6 +- .../compress/compressors/gzip/GzipUtils.java | 30 ++++----- .../compress/compressors/lzma/LZMAUtils.java | 28 ++++---- .../commons/compress/compressors/xz/XZUtils.java | 30 ++++----- .../apache/commons/compress/AbstractTestCase.java | 2 +- .../compress/archivers/zip/UTF8ZipFilesTest.java | 2 +- .../compress/changes/ChangeSetTestCase.java | 4 +- 30 files changed, 200 insertions(+), 200 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java index 5d74e87..bd871df 100644 --- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java @@ -351,16 +351,16 @@ public class ArArchiveInputStream extends ArchiveInputStream { * Is this the name of the "Archive String Table" as used by * SVR4/GNU to store long file names? * - * <p>GNU ar stores multiple extended filenames in the data section + * <p>GNU ar stores multiple extended file names in the data section * of a file with the name "//", this record is referred to by * future headers.</p> * - * <p>A header references an extended filename by storing a "/" - * followed by a decimal offset to the start of the filename in - * the extended filename data section.</p> + * <p>A header references an extended file name by storing a "/" + * followed by a decimal offset to the start of the file name in + * the extended file name data section.</p> * * <p>The format of the "//" file itself is simply a list of the - * long filenames, each separated by one or more LF + * long file names, each separated by one or more LF * characters. Note that the decimal offsets are number of * characters, not line or string number within the "//" file.</p> */ diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java index 575b5ee..de010e7 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveEntry.java @@ -53,8 +53,8 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * <h3>OLD FORMAT</h3> * * <p>Each file has a 76 (ascii) / 26 (binary) byte header, a variable - * length, NUL terminated filename, and variable length file data. A - * header for a filename "TRAILER!!!" indicates the end of the + * length, NUL terminated file name, and variable length file data. A + * header for a file name "TRAILER!!!" indicates the end of the * archive.</p> * * <p>All the fields in the header are ISO 646 (approximately ASCII) @@ -88,7 +88,7 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * apart from c_mtime and c_filesize which are 32-bit integer values * </pre> * - * <p>If necessary, the filename and file data are padded with a NUL byte to an even length</p> + * <p>If necessary, the file name and file data are padded with a NUL byte to an even length</p> * * <p>Special files, directories, and the trailer are recorded with * the h_filesize field equal to 0.</p> @@ -99,8 +99,8 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * <h3>NEW FORMAT</h3> * * <p>Each file has a 110 byte header, a variable length, NUL - * terminated filename, and variable length file data. A header for a - * filename "TRAILER!!!" indicates the end of the archive. All the + * terminated file name, and variable length file data. A header for a + * file name "TRAILER!!!" indicates the end of the archive. All the * fields in the header are ISO 646 (approximately ASCII) strings of * hexadecimal numbers, left padded, not NUL terminated.</p> * diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java index d5deb0e..68625dc 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveInputStream.java @@ -89,7 +89,7 @@ public class CpioArchiveInputStream extends ArchiveInputStream implements private final int blockSize; /** - * The encoding to use for filenames and labels. + * The encoding to use for file names and labels. */ private final ZipEncoding zipEncoding; diff --git a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java index e2791d1..9aefd33 100644 --- a/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStream.java @@ -91,7 +91,7 @@ public class CpioArchiveOutputStream extends ArchiveOutputStream implements private long nextArtificalDeviceAndInode = 1; /** - * The encoding to use for filenames and labels. + * The encoding to use for file names and labels. */ private final ZipEncoding zipEncoding; diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java index e284505..42b7f46 100644 --- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java +++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java @@ -157,9 +157,9 @@ import org.apache.commons.compress.archivers.ArchiveEntry; * </pre> * <p> * It is important to note that the header DOES NOT have the name of the - * file. It can't since hard links mean that you may have multiple filenames + * file. It can't since hard links mean that you may have multiple file names * for a single physical file. You must read the contents of the directory - * entries to learn the mapping(s) from filename to inode. + * entries to learn the mapping(s) from file name to inode. * </p> * * <p> @@ -215,9 +215,9 @@ public class DumpArchiveEntry implements ArchiveEntry { } /** - * Constructor taking only filename. + * Constructor taking only file name. * @param name pathname - * @param simpleName actual filename. + * @param simpleName actual file name. */ public DumpArchiveEntry(final String name, final String simpleName) { setName(name); diff --git a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java index ed4f02f..544765b 100644 --- a/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java @@ -72,7 +72,7 @@ public class DumpArchiveInputStream extends ArchiveInputStream { private Queue<DumpArchiveEntry> queue; /** - * The encoding to use for filenames and labels. + * The encoding to use for file names and labels. */ private final ZipEncoding zipEncoding; diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java index 15d8bd0..8b56a1f 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java @@ -100,48 +100,48 @@ public class SevenZFile implements Closeable { /** * Reads a file as 7z archive * - * @param filename the file to read + * @param fileName the file to read * @param password optional password if the archive is encrypted * @throws IOException if reading the archive fails * @since 1.17 */ - public SevenZFile(final File filename, final char[] password) throws IOException { - this(filename, password, Integer.MAX_VALUE); + public SevenZFile(final File fileName, final char[] password) throws IOException { + this(fileName, password, Integer.MAX_VALUE); } /** * Reads a file as 7z archive with memory limitation * - * @param filename the file to read + * @param fileName the file to read * @param password optional password if the archive is encrypted * @param maxMemoryLimitInKb limit of the maximum amount of memory to use for extraction. Not all codecs will honor * this setting. Currently only lzma and lzma2 are supported. * @throws IOException if reading the archive fails or the memory limit is too small * @since 1.19 */ - public SevenZFile(final File filename, final char[] password, final int maxMemoryLimitInKb) throws IOException { - this(Files.newByteChannel(filename.toPath(), EnumSet.of(StandardOpenOption.READ)), - filename.getAbsolutePath(), utf16Decode(password), true, maxMemoryLimitInKb); + public SevenZFile(final File fileName, final char[] password, final int maxMemoryLimitInKb) throws IOException { + this(Files.newByteChannel(fileName.toPath(), EnumSet.of(StandardOpenOption.READ)), + fileName.getAbsolutePath(), utf16Decode(password), true, maxMemoryLimitInKb); } /** * Reads a file as 7z archive * - * @param filename the file to read + * @param fileName the file to read * @param password optional password if the archive is encrypted - * the byte array is supposed to be the UTF16-LE encoded * representation of the password. * @throws IOException if reading the archive fails * @deprecated use the char[]-arg version for the password instead */ - public SevenZFile(final File filename, final byte[] password) throws IOException { - this(filename, password, Integer.MAX_VALUE); + public SevenZFile(final File fileName, final byte[] password) throws IOException { + this(fileName, password, Integer.MAX_VALUE); } /** * Reads a file as 7z archive with memory limitation * - * @param filename the file to read + * @param fileName the file to read * @param password optional password if the archive is encrypted - * the byte array is supposed to be the UTF16-LE encoded * representation of the password. @@ -151,8 +151,8 @@ public class SevenZFile implements Closeable { * @deprecated use the char[]-arg version for the password instead * @since 1.19 */ - public SevenZFile(final File filename, final byte[] password, final int maxMemoryLimitInKb) throws IOException { - this(Files.newByteChannel(filename.toPath(), EnumSet.of(StandardOpenOption.READ)), filename.getAbsolutePath(), + public SevenZFile(final File fileName, final byte[] password, final int maxMemoryLimitInKb) throws IOException { + this(Files.newByteChannel(fileName.toPath(), EnumSet.of(StandardOpenOption.READ)), fileName.getAbsolutePath(), password, true, maxMemoryLimitInKb); } @@ -232,14 +232,14 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @param password optional password if the archive is encrypted * @throws IOException if reading the archive fails * @since 1.17 */ - public SevenZFile(final SeekableByteChannel channel, String filename, + public SevenZFile(final SeekableByteChannel channel, String fileName, final char[] password) throws IOException { - this(channel, filename, password, Integer.MAX_VALUE); + this(channel, fileName, password, Integer.MAX_VALUE); } /** @@ -250,16 +250,16 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @param password optional password if the archive is encrypted * @param maxMemoryLimitInKb limit of the maximum amount of memory to use for extraction. Not all codecs will honor * this setting. Currently only lzma and lzma2 are supported. * @throws IOException if reading the archive fails or the memory limit is too small * @since 1.19 */ - public SevenZFile(final SeekableByteChannel channel, String filename, final char[] password, + public SevenZFile(final SeekableByteChannel channel, String fileName, final char[] password, final int maxMemoryLimitInKb) throws IOException { - this(channel, filename, utf16Decode(password), false, maxMemoryLimitInKb); + this(channel, fileName, utf16Decode(password), false, maxMemoryLimitInKb); } /** @@ -270,13 +270,13 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @throws IOException if reading the archive fails * @since 1.17 */ - public SevenZFile(final SeekableByteChannel channel, String filename) + public SevenZFile(final SeekableByteChannel channel, String fileName) throws IOException { - this(channel, filename, Integer.MAX_VALUE); + this(channel, fileName, Integer.MAX_VALUE); } /** @@ -287,15 +287,15 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @param maxMemoryLimitInKb limit of the maximum amount of memory to use for extraction. Not all codecs will honor * this setting. Currently only lzma and lzma2 are supported. * @throws IOException if reading the archive fails or the memory limit is too small * @since 1.19 */ - public SevenZFile(final SeekableByteChannel channel, String filename, final int maxMemoryLimitInKb) + public SevenZFile(final SeekableByteChannel channel, String fileName, final int maxMemoryLimitInKb) throws IOException { - this(channel, filename, null, false, maxMemoryLimitInKb); + this(channel, fileName, null, false, maxMemoryLimitInKb); } /** @@ -348,7 +348,7 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @param password optional password if the archive is encrypted - * the byte array is supposed to be the UTF16-LE encoded * representation of the password. @@ -356,9 +356,9 @@ public class SevenZFile implements Closeable { * @since 1.13 * @deprecated use the char[]-arg version for the password instead */ - public SevenZFile(final SeekableByteChannel channel, String filename, + public SevenZFile(final SeekableByteChannel channel, String fileName, final byte[] password) throws IOException { - this(channel, filename, password, false, Integer.MAX_VALUE); + this(channel, fileName, password, false, Integer.MAX_VALUE); } /** @@ -369,7 +369,7 @@ public class SevenZFile implements Closeable { * allows you to read from an in-memory archive.</p> * * @param channel the channel to read - * @param filename name of the archive - only used for error reporting + * @param fileName name of the archive - only used for error reporting * @param password optional password if the archive is encrypted - * the byte array is supposed to be the UTF16-LE encoded * representation of the password. @@ -379,9 +379,9 @@ public class SevenZFile implements Closeable { * @since 1.19 * @deprecated use the char[]-arg version for the password instead */ - public SevenZFile(final SeekableByteChannel channel, String filename, final byte[] password, + public SevenZFile(final SeekableByteChannel channel, String fileName, final byte[] password, final int maxMemoryLimitInKb) throws IOException { - this(channel, filename, password, false, maxMemoryLimitInKb); + this(channel, fileName, password, false, maxMemoryLimitInKb); } private SevenZFile(final SeekableByteChannel channel, String filename, @@ -408,24 +408,24 @@ public class SevenZFile implements Closeable { /** * Reads a file as unencrypted 7z archive * - * @param filename the file to read + * @param fileName the file to read * @throws IOException if reading the archive fails */ - public SevenZFile(final File filename) throws IOException { - this(filename, Integer.MAX_VALUE); + public SevenZFile(final File fileName) throws IOException { + this(fileName, Integer.MAX_VALUE); } /** * Reads a file as unencrypted 7z archive * - * @param filename the file to read + * @param fileName the file to read * @param maxMemoryLimitInKb limit of the maximum amount of memory to use for extraction. Not all codecs will honor * this setting. Currently only lzma and lzma2 are supported. * @throws IOException if reading the archive fails or the memory limit is too small * @since 1.19 */ - public SevenZFile(final File filename, final int maxMemoryLimitInKb) throws IOException { - this(filename, (char[]) null, maxMemoryLimitInKb); + public SevenZFile(final File fileName, final int maxMemoryLimitInKb) throws IOException { + this(fileName, (char[]) null, maxMemoryLimitInKb); } /** diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java index db47f44..c95da10 100644 --- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFile.java @@ -64,11 +64,11 @@ public class SevenZOutputFile implements Closeable { /** * Opens file to write a 7z archive to. * - * @param filename the file to write to + * @param fileName the file to write to * @throws IOException if opening the file fails */ - public SevenZOutputFile(final File filename) throws IOException { - this(Files.newByteChannel(filename.toPath(), + public SevenZOutputFile(final File fileName) throws IOException { + this(Files.newByteChannel(fileName.toPath(), EnumSet.of(StandardOpenOption.CREATE, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING))); } diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java index 846c9e1..16eed76 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/AbstractUnicodeExtraField.java @@ -41,11 +41,11 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { * encoding of the original zip entry. * * @param text The file name or comment. - * @param bytes The encoded of the filename or comment in the zip + * @param bytes The encoded of the file name or comment in the zip * file. - * @param off The offset of the encoded filename or comment in + * @param off The offset of the encoded file name or comment in * <code>bytes</code>. - * @param len The length of the encoded filename or commentin + * @param len The length of the encoded file name or commentin * <code>bytes</code>. */ protected AbstractUnicodeExtraField(final String text, final byte[] bytes, final int off, final int len) { @@ -65,7 +65,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { * encoding of the original zip entry. * * @param text The file name or comment. - * @param bytes The encoded of the filename or comment in the zip + * @param bytes The encoded of the file name or comment in the zip * file. */ protected AbstractUnicodeExtraField(final String text, final byte[] bytes) { @@ -85,7 +85,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { } /** - * @return The CRC32 checksum of the filename or comment as + * @return The CRC32 checksum of the file name or comment as * encoded in the central directory of the zip file. */ public long getNameCRC32() { @@ -93,7 +93,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField { } /** - * @param nameCRC32 The CRC32 checksum of the filename as encoded + * @param nameCRC32 The CRC32 checksum of the file name as encoded * in the central directory of the zip file to set. */ public void setNameCRC32(final long nameCRC32) { diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java index 9cef2cc..490943b 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java @@ -36,7 +36,7 @@ import java.util.zip.ZipException; * SizDev Long symlink'd size OR major/minor dev num * UID Short user ID * GID Short group ID - * (var.) variable symbolic link filename + * (var.) variable symbolic link file name * </pre> * <p>taken from appnote.iz (Info-ZIP note, 981119) found at <a * href="ftp://ftp.uu.net/pub/archiving/zip/doc/">ftp://ftp.uu.net/pub/archiving/zip/doc/</a></p> @@ -195,7 +195,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable { } /** - * Indicate that this entry is a symbolic link to the given filename. + * Indicate that this entry is a symbolic link to the given file name. * * @param name Name of the file this entry links to, empty String * if it is not a symbolic link. diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java index dd363aa..c9af79d 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/GeneralPurposeBit.java @@ -61,7 +61,7 @@ public final class GeneralPurposeBit implements Cloneable { private static final int STRONG_ENCRYPTION_FLAG = 1 << 6; /** - * Indicates that filenames are written in UTF-8. + * Indicates that file names are written in UTF-8. * * <p>The only reason this is public is that {@link * ZipArchiveOutputStream#EFS_FLAG} was public in Apache Commons diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java index 510c5ad..ab2796e 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/UnicodePathExtraField.java @@ -42,8 +42,8 @@ public class UnicodePathExtraField extends AbstractUnicodeExtraField { * * @param text The file name * @param bytes the bytes actually written to the archive - * @param off The offset of the encoded filename in <code>bytes</code>. - * @param len The length of the encoded filename or comment in + * @param off The offset of the encoded file name in <code>bytes</code>. + * @param len The length of the encoded file name or comment in * <code>bytes</code>. */ public UnicodePathExtraField(final String text, final byte[] bytes, final int off, final int len) { diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java index 196e402..3d33fa4 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java @@ -80,7 +80,7 @@ import static org.apache.commons.compress.archivers.zip.ZipConstants.ZIP64_MAGIC */ public class ZipArchiveInputStream extends ArchiveInputStream implements InputStreamStatistics { - /** The zip encoding to use for filenames and the file comment. */ + /** The zip encoding to use for file names and the file comment. */ private final ZipEncoding zipEncoding; // the provided encoding (for unit tests) diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java index 32ad710..c40aab2 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java @@ -136,7 +136,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { static final String DEFAULT_ENCODING = ZipEncodingHelper.UTF8; /** - * General purpose flag, which indicates that filenames are + * General purpose flag, which indicates that file names are * written in UTF-8. * @deprecated use {@link GeneralPurposeBit#UFT8_NAMES_FLAG} instead */ @@ -208,7 +208,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { new HashMap<>(); /** - * The encoding to use for filenames and the file comment. + * The encoding to use for file names and the file comment. * * <p>For a list of possible values see <a * href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html</a>. @@ -217,7 +217,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { private String encoding = DEFAULT_ENCODING; /** - * The zip encoding to use for filenames and the file comment. + * The zip encoding to use for file names and the file comment. * * This field is of internal use and will be set in {@link * #setEncoding(String)}. @@ -240,7 +240,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { /** * whether to use the general purpose bit flag when writing UTF-8 - * filenames or not. + * file names or not. */ private boolean useUTF8Flag = true; @@ -339,7 +339,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { } /** - * The encoding to use for filenames and the file comment. + * The encoding to use for file names and the file comment. * * <p>For a list of possible values see <a * href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html</a>. @@ -356,7 +356,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { } /** - * The encoding to use for filenames and the file comment. + * The encoding to use for file names and the file comment. * * @return null if using the platform's default character encoding. */ @@ -1628,7 +1628,7 @@ public class ZipArchiveOutputStream extends ArchiveOutputStream { */ public static final UnicodeExtraFieldPolicy NEVER = new UnicodeExtraFieldPolicy("never"); /** - * Create Unicode extra fields for filenames that cannot be + * Create Unicode extra fields for file names that cannot be * encoded using the specified encoding. */ public static final UnicodeExtraFieldPolicy NOT_ENCODEABLE = diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java index dacd063..fc52e57 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncoding.java @@ -24,7 +24,7 @@ import java.nio.ByteBuffer; /** * An interface for encoders that do a pretty encoding of ZIP - * filenames. + * file names. * * <p>There are mostly two implementations, one that uses java.nio * {@link java.nio.charset.Charset Charset} and one implementation, @@ -35,7 +35,7 @@ import java.nio.ByteBuffer; * the problems with {@link java.lang.String#getBytes(String) * String.getBytes}, which encodes unknown characters as ASCII * quotation marks ('?'). Quotation marks are per definition an - * invalid filename on some operating systems like Windows, which + * invalid file name on some operating systems like Windows, which * leads to ignored ZIP entries.</p> * * <p>All implementations should implement this interface in a @@ -46,13 +46,13 @@ public interface ZipEncoding { * Check, whether the given string may be losslessly encoded using this * encoding. * - * @param name A filename or ZIP comment. + * @param name A file name or ZIP comment. * @return Whether the given name may be encoded with out any losses. */ boolean canEncode(String name); /** - * Encode a filename or a comment to a byte array suitable for + * Encode a file name or a comment to a byte array suitable for * storing it to a serialized zip entry. * * <p>Examples for CP 437 (in pseudo-notation, right hand side is @@ -62,7 +62,7 @@ public interface ZipEncoding { * encode("\u00D6lf\u00E4sser.txt") = "\231lf\204sser.txt" * </pre> * - * @param name A filename or ZIP comment. + * @param name A file name or ZIP comment. * @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 diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java index 8aeb789..0dd605e 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipEncodingHelper.java @@ -24,7 +24,7 @@ import java.nio.charset.StandardCharsets; import java.nio.charset.UnsupportedCharsetException; /** - * Static helper functions for robustly encoding filenames in zip files. + * Static helper functions for robustly encoding file names in zip files. */ public abstract class ZipEncodingHelper { diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java index ca6e584..152272b 100644 --- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java +++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java @@ -110,7 +110,7 @@ public class ZipFile implements Closeable { new HashMap<>(HASH_SIZE); /** - * The encoding to use for filenames and the file comment. + * The encoding to use for file names and the file comment. * * <p>For a list of possible values see <a * href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html</a>. @@ -119,7 +119,7 @@ public class ZipFile implements Closeable { private final String encoding; /** - * The zip encoding to use for filenames and the file comment. + * The zip encoding to use for file names and the file comment. */ private final ZipEncoding zipEncoding; @@ -375,7 +375,7 @@ public class ZipFile implements Closeable { } /** - * The encoding to use for filenames and the file comment. + * The encoding to use for file names and the file comment. * * @return null if using the platform's default character encoding. */ @@ -664,7 +664,7 @@ public class ZipFile implements Closeable { /* crc-32 */ + WORD /* compressed size */ + WORD /* uncompressed size */ + WORD - /* filename length */ + SHORT + /* file name length */ + SHORT /* extra field length */ + SHORT /* file comment length */ + SHORT /* disk number start */ + SHORT @@ -1093,7 +1093,7 @@ public class ZipFile implements Closeable { /** * Number of bytes in local file header up to the "length of - * filename" entry. + * file name" entry. */ private static final long LFH_OFFSET_FOR_FILENAME_LENGTH = /* local file header signature */ WORD diff --git a/src/main/java/org/apache/commons/compress/changes/Change.java b/src/main/java/org/apache/commons/compress/changes/Change.java index fb901bd..27f293b 100644 --- a/src/main/java/org/apache/commons/compress/changes/Change.java +++ b/src/main/java/org/apache/commons/compress/changes/Change.java @@ -42,15 +42,15 @@ class Change { static final int TYPE_DELETE_DIR = 4; /** - * Constructor. Takes the filename of the file to be deleted + * Constructor. Takes the file name of the file to be deleted * from the stream as argument. - * @param pFilename the filename of the file to delete + * @param fileName the file name of the file to delete */ - Change(final String pFilename, final int type) { - if(pFilename == null) { + Change(final String fileName, final int type) { + if(fileName == null) { throw new NullPointerException(); } - this.targetFile = pFilename; + this.targetFile = fileName; this.type = type; this.input = null; this.entry = null; diff --git a/src/main/java/org/apache/commons/compress/changes/ChangeSet.java b/src/main/java/org/apache/commons/compress/changes/ChangeSet.java index c0f8c61..84a4b15 100644 --- a/src/main/java/org/apache/commons/compress/changes/ChangeSet.java +++ b/src/main/java/org/apache/commons/compress/changes/ChangeSet.java @@ -37,13 +37,13 @@ public final class ChangeSet { private final Set<Change> changes = new LinkedHashSet<>(); /** - * Deletes the file with the filename from the archive. + * Deletes the file with the file name from the archive. * - * @param filename - * the filename of the file to delete + * @param fileName + * the file name of the file to delete */ - public void delete(final String filename) { - addDeletion(new Change(filename, Change.TYPE_DELETE)); + public void delete(final String fileName) { + addDeletion(new Change(fileName, Change.TYPE_DELETE)); } /** diff --git a/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java b/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java index 788dccf..540c559 100644 --- a/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java +++ b/src/main/java/org/apache/commons/compress/changes/ChangeSetResults.java @@ -30,7 +30,7 @@ public class ChangeSetResults { private final List<String> deleted = new ArrayList<>(); /** - * Adds the filename of a recently deleted file to the result list. + * Adds the file name of a recently deleted file to the result list. * @param fileName the file which has been deleted */ void deleted(final String fileName) { @@ -56,35 +56,35 @@ public class ChangeSetResults { } /** - * Returns a list of filenames which has been added from the changeset - * @return the list of filenames + * Returns a list of file names which has been added from the changeset + * @return the list of file names */ public List<String> getAddedFromChangeSet() { return addedFromChangeSet; } /** - * Returns a list of filenames which has been added from the original stream - * @return the list of filenames + * Returns a list of file names which has been added from the original stream + * @return the list of file names */ public List<String> getAddedFromStream() { return addedFromStream; } /** - * Returns a list of filenames which has been deleted - * @return the list of filenames + * Returns a list of file names which has been deleted + * @return the list of file names */ public List<String> getDeleted() { return deleted; } /** - * Checks if an filename already has been added to the result list - * @param filename the filename to check - * @return true, if this filename already has been added + * Checks if an file name already has been added to the result list + * @param fileName the file name to check + * @return true, if this file name already has been added */ - boolean hasBeenAdded(final String filename) { - return addedFromChangeSet.contains(filename) || addedFromStream.contains(filename); + boolean hasBeenAdded(final String fileName) { + return addedFromChangeSet.contains(fileName) || addedFromStream.contains(fileName); } } diff --git a/src/main/java/org/apache/commons/compress/compressors/FileNameUtil.java b/src/main/java/org/apache/commons/compress/compressors/FileNameUtil.java index f97bb8e..cc69031 100644 --- a/src/main/java/org/apache/commons/compress/compressors/FileNameUtil.java +++ b/src/main/java/org/apache/commons/compress/compressors/FileNameUtil.java @@ -31,20 +31,20 @@ import java.util.Map; public class FileNameUtil { /** - * Map from common filename suffixes to the suffixes that identify compressed + * Map from common file name suffixes to the suffixes that identify compressed * versions of those file types. For example: from ".tar" to ".tgz". */ private final Map<String, String> compressSuffix = new HashMap<>(); /** - * Map from common filename suffixes of compressed files to the + * Map from common file name suffixes of compressed files to the * corresponding suffixes of uncompressed files. For example: from * ".tgz" to ".tar". * <p> * This map also contains format-specific suffixes like ".gz" and "-z". * These suffixes are mapped to the empty string, as they should simply - * be removed from the filename when the file is uncompressed. + * be removed from the file name when the file is uncompressed. */ private final Map<String, String> uncompressSuffix; @@ -79,12 +79,12 @@ public class FileNameUtil { * uncompressed suffix mappings and the default extension of the * format. * - * @param uncompressSuffix Map from common filename suffixes of + * @param uncompressSuffix Map from common file name suffixes of * compressed files to the corresponding suffixes of uncompressed * files. For example: from ".tgz" to ".tar". This map also * contains format-specific suffixes like ".gz" and "-z". These * suffixes are mapped to the empty string, as they should simply - * be removed from the filename when the file is uncompressed. + * be removed from the file name when the file is uncompressed. * * @param defaultExtension the format's default extension like ".gz" */ @@ -124,14 +124,14 @@ public class FileNameUtil { } /** - * Detects common format suffixes in the given filename. + * Detects common format suffixes in the given file name. * - * @param filename name of a file - * @return {@code true} if the filename has a common format suffix, + * @param fileName name of a file + * @return {@code true} if the file name has a common format suffix, * {@code false} otherwise */ - public boolean isCompressedFilename(final String filename) { - final String lower = filename.toLowerCase(Locale.ENGLISH); + public boolean isCompressedFilename(final String fileName) { + final String lower = fileName.toLowerCase(Locale.ENGLISH); final int n = lower.length(); for (int i = shortestCompressedSuffix; i <= longestCompressedSuffix && i < n; i++) { @@ -147,50 +147,50 @@ public class FileNameUtil { * file should have after uncompression. Commonly used file type specific * suffixes like ".tgz" or ".svgz" are automatically detected and * correctly mapped. For example the name "package.tgz" is mapped to - * "package.tar". And any filenames with the generic ".gz" suffix + * "package.tar". And any file names with the generic ".gz" suffix * (or any other generic gzip suffix) is mapped to a name without that - * suffix. If no format suffix is detected, then the filename is returned + * suffix. If no format suffix is detected, then the file name is returned * unmapped. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding uncompressed file */ - public String getUncompressedFilename(final String filename) { - final String lower = filename.toLowerCase(Locale.ENGLISH); + public String getUncompressedFilename(final String fileName) { + final String lower = fileName.toLowerCase(Locale.ENGLISH); final int n = lower.length(); for (int i = shortestCompressedSuffix; i <= longestCompressedSuffix && i < n; i++) { final String suffix = uncompressSuffix.get(lower.substring(n - i)); if (suffix != null) { - return filename.substring(0, n - i) + suffix; + return fileName.substring(0, n - i) + suffix; } } - return filename; + return fileName; } /** - * Maps the given filename to the name that the file should have after + * Maps the given file name to the name that the file should have after * compression. Common file types with custom suffixes for * compressed versions are automatically detected and correctly mapped. * For example the name "package.tar" is mapped to "package.tgz". If no * custom mapping is applicable, then the default ".gz" suffix is appended - * to the filename. + * to the file name. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding compressed file */ - public String getCompressedFilename(final String filename) { - final String lower = filename.toLowerCase(Locale.ENGLISH); + public String getCompressedFilename(final String fileName) { + final String lower = fileName.toLowerCase(Locale.ENGLISH); final int n = lower.length(); for (int i = shortestUncompressedSuffix; i <= longestUncompressedSuffix && i < n; i++) { final String suffix = compressSuffix.get(lower.substring(n - i)); if (suffix != null) { - return filename.substring(0, n - i) + suffix; + return fileName.substring(0, n - i) + suffix; } } // No custom suffix found, just append the default - return filename + defaultExtension; + return fileName + defaultExtension; } } diff --git a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2Utils.java b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2Utils.java index 5582d98..981d0fc 100644 --- a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2Utils.java +++ b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2Utils.java @@ -49,14 +49,14 @@ public abstract class BZip2Utils { } /** - * Detects common bzip2 suffixes in the given filename. + * Detects common bzip2 suffixes in the given file name. * - * @param filename name of a file - * @return {@code true} if the filename has a common bzip2 suffix, + * @param fileName name of a file + * @return {@code true} if the file name has a common bzip2 suffix, * {@code false} otherwise */ - public static boolean isCompressedFilename(final String filename) { - return fileNameUtil.isCompressedFilename(filename); + public static boolean isCompressedFilename(final String fileName) { + return fileNameUtil.isCompressedFilename(fileName); } /** @@ -64,30 +64,30 @@ public abstract class BZip2Utils { * file should have after uncompression. Commonly used file type specific * suffixes like ".tbz" or ".tbz2" are automatically detected and * correctly mapped. For example the name "package.tbz2" is mapped to - * "package.tar". And any filenames with the generic ".bz2" suffix + * "package.tar". And any file names with the generic ".bz2" suffix * (or any other generic bzip2 suffix) is mapped to a name without that - * suffix. If no bzip2 suffix is detected, then the filename is returned + * suffix. If no bzip2 suffix is detected, then the file name is returned * unmapped. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding uncompressed file */ - public static String getUncompressedFilename(final String filename) { - return fileNameUtil.getUncompressedFilename(filename); + public static String getUncompressedFilename(final String fileName) { + return fileNameUtil.getUncompressedFilename(fileName); } /** - * Maps the given filename to the name that the file should have after + * Maps the given file name to the name that the file should have after * compression with bzip2. Currently this method simply appends the suffix - * ".bz2" to the filename based on the standard behaviour of the "bzip2" + * ".bz2" to the file name based on the standard behaviour of the "bzip2" * program, but a future version may implement a more complex mapping if * a new widely used naming pattern emerges. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding compressed file */ - public static String getCompressedFilename(final String filename) { - return fileNameUtil.getCompressedFilename(filename); + public static String getCompressedFilename(final String fileName) { + return fileNameUtil.getCompressedFilename(fileName); } } diff --git a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.java b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.java index bb5e177..939b3f8 100644 --- a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.java +++ b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.java @@ -33,7 +33,7 @@ import org.apache.commons.compress.utils.CharsetNames; /** * Compressed output stream using the gzip format. This implementation improves * over the standard {@link GZIPOutputStream} class by allowing - * the configuration of the compression level and the header metadata (filename, + * the configuration of the compression level and the header metadata (file name, * comment, modification time, operating system and extra flags). * * @see <a href="https://tools.ietf.org/html/rfc1952">GZIP File Format Specification</a> diff --git a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipParameters.java b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipParameters.java index c4db5bc..ff9303b 100644 --- a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipParameters.java +++ b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipParameters.java @@ -74,10 +74,10 @@ public class GzipParameters { /** * Sets the name of the compressed file. * - * @param filename the name of the file without the directory path + * @param fileName the name of the file without the directory path */ - public void setFilename(final String filename) { - this.filename = filename; + public void setFilename(final String fileName) { + this.filename = fileName; } public String getComment() { diff --git a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipUtils.java b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipUtils.java index 0edf655..b75a469 100644 --- a/src/main/java/org/apache/commons/compress/compressors/gzip/GzipUtils.java +++ b/src/main/java/org/apache/commons/compress/compressors/gzip/GzipUtils.java @@ -55,14 +55,14 @@ public class GzipUtils { } /** - * Detects common gzip suffixes in the given filename. + * Detects common gzip suffixes in the given file name. * - * @param filename name of a file - * @return {@code true} if the filename has a common gzip suffix, + * @param fileName name of a file + * @return {@code true} if the file name has a common gzip suffix, * {@code false} otherwise */ - public static boolean isCompressedFilename(final String filename) { - return fileNameUtil.isCompressedFilename(filename); + public static boolean isCompressedFilename(final String fileName) { + return fileNameUtil.isCompressedFilename(fileName); } /** @@ -70,31 +70,31 @@ public class GzipUtils { * file should have after uncompression. Commonly used file type specific * suffixes like ".tgz" or ".svgz" are automatically detected and * correctly mapped. For example the name "package.tgz" is mapped to - * "package.tar". And any filenames with the generic ".gz" suffix + * "package.tar". And any file names with the generic ".gz" suffix * (or any other generic gzip suffix) is mapped to a name without that - * suffix. If no gzip suffix is detected, then the filename is returned + * suffix. If no gzip suffix is detected, then the file name is returned * unmapped. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding uncompressed file */ - public static String getUncompressedFilename(final String filename) { - return fileNameUtil.getUncompressedFilename(filename); + public static String getUncompressedFilename(final String fileName) { + return fileNameUtil.getUncompressedFilename(fileName); } /** - * Maps the given filename to the name that the file should have after + * Maps the given file name to the name that the file should have after * compression with gzip. Common file types with custom suffixes for * compressed versions are automatically detected and correctly mapped. * For example the name "package.tar" is mapped to "package.tgz". If no * custom mapping is applicable, then the default ".gz" suffix is appended - * to the filename. + * to the file name. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding compressed file */ - public static String getCompressedFilename(final String filename) { - return fileNameUtil.getCompressedFilename(filename); + public static String getCompressedFilename(final String fileName) { + return fileNameUtil.getCompressedFilename(fileName); } } diff --git a/src/main/java/org/apache/commons/compress/compressors/lzma/LZMAUtils.java b/src/main/java/org/apache/commons/compress/compressors/lzma/LZMAUtils.java index 964014a..2ebb0ce 100644 --- a/src/main/java/org/apache/commons/compress/compressors/lzma/LZMAUtils.java +++ b/src/main/java/org/apache/commons/compress/compressors/lzma/LZMAUtils.java @@ -105,39 +105,39 @@ public class LZMAUtils { } /** - * Detects common lzma suffixes in the given filename. + * Detects common lzma suffixes in the given file name. * - * @param filename name of a file - * @return {@code true} if the filename has a common lzma suffix, + * @param fileName name of a file + * @return {@code true} if the file name has a common lzma suffix, * {@code false} otherwise */ - public static boolean isCompressedFilename(final String filename) { - return fileNameUtil.isCompressedFilename(filename); + public static boolean isCompressedFilename(final String fileName) { + return fileNameUtil.isCompressedFilename(fileName); } /** * Maps the given name of a lzma-compressed file to the name that - * the file should have after uncompression. Any filenames with + * the file should have after uncompression. Any file names with * the generic ".lzma" suffix (or any other generic lzma suffix) * is mapped to a name without that suffix. If no lzma suffix is - * detected, then the filename is returned unmapped. + * detected, then the file name is returned unmapped. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding uncompressed file */ - public static String getUncompressedFilename(final String filename) { - return fileNameUtil.getUncompressedFilename(filename); + public static String getUncompressedFilename(final String fileName) { + return fileNameUtil.getUncompressedFilename(fileName); } /** - * Maps the given filename to the name that the file should have after + * Maps the given file name to the name that the file should have after * compression with lzma. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding compressed file */ - public static String getCompressedFilename(final String filename) { - return fileNameUtil.getCompressedFilename(filename); + public static String getCompressedFilename(final String fileName) { + return fileNameUtil.getCompressedFilename(fileName); } /** diff --git a/src/main/java/org/apache/commons/compress/compressors/xz/XZUtils.java b/src/main/java/org/apache/commons/compress/compressors/xz/XZUtils.java index 2884780..619a385 100644 --- a/src/main/java/org/apache/commons/compress/compressors/xz/XZUtils.java +++ b/src/main/java/org/apache/commons/compress/compressors/xz/XZUtils.java @@ -114,14 +114,14 @@ public class XZUtils { } /** - * Detects common xz suffixes in the given filename. + * Detects common xz suffixes in the given file name. * - * @param filename name of a file - * @return {@code true} if the filename has a common xz suffix, + * @param fileName name of a file + * @return {@code true} if the file name has a common xz suffix, * {@code false} otherwise */ - public static boolean isCompressedFilename(final String filename) { - return fileNameUtil.isCompressedFilename(filename); + public static boolean isCompressedFilename(final String fileName) { + return fileNameUtil.isCompressedFilename(fileName); } /** @@ -129,31 +129,31 @@ public class XZUtils { * file should have after uncompression. Commonly used file type specific * suffixes like ".txz" are automatically detected and * correctly mapped. For example the name "package.txz" is mapped to - * "package.tar". And any filenames with the generic ".xz" suffix + * "package.tar". And any file names with the generic ".xz" suffix * (or any other generic xz suffix) is mapped to a name without that - * suffix. If no xz suffix is detected, then the filename is returned + * suffix. If no xz suffix is detected, then the file name is returned * unmapped. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding uncompressed file */ - public static String getUncompressedFilename(final String filename) { - return fileNameUtil.getUncompressedFilename(filename); + public static String getUncompressedFilename(final String fileName) { + return fileNameUtil.getUncompressedFilename(fileName); } /** - * Maps the given filename to the name that the file should have after + * Maps the given file name to the name that the file should have after * compression with xz. Common file types with custom suffixes for * compressed versions are automatically detected and correctly mapped. * For example the name "package.tar" is mapped to "package.txz". If no * custom mapping is applicable, then the default ".xz" suffix is appended - * to the filename. + * to the file name. * - * @param filename name of a file + * @param fileName name of a file * @return name of the corresponding compressed file */ - public static String getCompressedFilename(final String filename) { - return fileNameUtil.getCompressedFilename(filename); + public static String getCompressedFilename(final String fileName) { + return fileNameUtil.getCompressedFilename(fileName); } /** diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java b/src/test/java/org/apache/commons/compress/AbstractTestCase.java index 9262aa3..992b785 100644 --- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java +++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java @@ -277,7 +277,7 @@ public abstract class AbstractTestCase { * @param archive * the archive to check * @param expected - * a list with expected string filenames + * a list with expected string file names * @throws Exception */ protected void checkArchiveContent(final File archive, final List<String> expected) diff --git a/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java b/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java index da9bb24..7c745a1 100644 --- a/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java @@ -89,7 +89,7 @@ public class UTF8ZipFilesTest extends AbstractTestCase { } /* - * 7-ZIP created archive, uses EFS to signal UTF-8 filenames. + * 7-ZIP created archive, uses EFS to signal UTF-8 file names. * * 7-ZIP doesn't use EFS for strings that can be encoded in CP437 * - which is true for OIL_BARREL_TXT. diff --git a/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java b/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java index 9565ae9..9287046 100644 --- a/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java +++ b/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java @@ -1202,7 +1202,7 @@ public final class ChangeSetTestCase extends AbstractTestCase { } /** - * Adds a file with the same filename as an existing file from the stream. + * Adds a file with the same file name as an existing file from the stream. * Should lead to a replacement. * * @throws Exception @@ -1247,7 +1247,7 @@ public final class ChangeSetTestCase extends AbstractTestCase { } /** - * Adds a file with the same filename as an existing file from the stream. + * Adds a file with the same file name as an existing file from the stream. * Should lead to a replacement. * * @throws Exception