commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1534219 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
Date Mon, 21 Oct 2013 15:31:39 GMT
Author: ggregory
Date: Mon Oct 21 15:31:38 2013
New Revision: 1534219

URL: http://svn.apache.org/r1534219
Log:
Better ivar and param name (charsetName instead of charset).

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java?rev=1534219&r1=1534218&r2=1534219&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
Mon Oct 21 15:31:38 2013
@@ -42,7 +42,7 @@ public class ArjArchiveInputStream exten
     private static final int ARJ_MAGIC_1 = 0x60;
     private static final int ARJ_MAGIC_2 = 0xEA;
     private final DataInputStream in;
-    private final String charset;
+    private final String charsetName;
     private final MainHeader mainHeader;
     private LocalFileHeader currentLocalFileHeader = null;
     private InputStream currentInputStream = null;
@@ -50,14 +50,14 @@ public class ArjArchiveInputStream exten
     /**
      * Constructs the ArjInputStream, taking ownership of the inputStream that is passed
in.
      * @param inputStream the underlying stream, whose ownership is taken
-     * @param charset the charset used for file names and comments
+     * @param charsetName the charset used for file names and comments
      *   in the archive
      * @throws ArchiveException
      */
     public ArjArchiveInputStream(final InputStream inputStream,
-            final String charset) throws ArchiveException {
+            final String charsetName) throws ArchiveException {
         in = new DataInputStream(inputStream);
-        this.charset = charset;
+        this.charsetName = charsetName;
         try {
             mainHeader = readMainHeader();
             if ((mainHeader.arjFlags & MainHeader.Flags.GARBLED) != 0) {
@@ -111,8 +111,8 @@ public class ArjArchiveInputStream exten
         while ((nextByte = in.readUnsignedByte()) != 0) {
             buffer.write(nextByte);
         }
-        if (charset != null) {
-            return new String(buffer.toByteArray(), charset);
+        if (charsetName != null) {
+            return new String(buffer.toByteArray(), charsetName);
         } else {
             return new String(buffer.toByteArray());
         }



Mime
View raw message