commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1158092 - in /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump: Dirent.java DumpArchiveEntry.java DumpArchiveInputStream.java DumpArchiveSummary.java DumpArchiveUtil.java TapeInputStream.java
Date Tue, 16 Aug 2011 03:13:32 GMT
Author: bodewig
Date: Tue Aug 16 03:13:32 2011
New Revision: 1158092

URL: http://svn.apache.org/viewvc?rev=1158092&view=rev
Log:
reduce public API of dump package, fix equals in DumpArchiveSummary. COMPRESS-132

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/Dirent.java
Tue Aug 16 03:13:32 2011
@@ -18,11 +18,10 @@
  */
 package org.apache.commons.compress.archivers.dump;
 
-
 /**
  * Directory entry.
  */
-public class Dirent {
+class Dirent {
     private int ino;
     private int parentIno;
     private int type;
@@ -36,7 +35,7 @@ public class Dirent {
      * @param type
      * @param name
      */
-    public Dirent(int ino, int parentIno, int type, String name) {
+    Dirent(int ino, int parentIno, int type, String name) {
         this.ino = ino;
         this.parentIno = parentIno;
         this.type = type;
@@ -47,7 +46,7 @@ public class Dirent {
      * Get ino.
      * @return the i-node
      */
-    public int getIno() {
+    int getIno() {
         return ino;
     }
 
@@ -55,7 +54,7 @@ public class Dirent {
      * Get ino of parent directory.
      * @return the parent i-node
      */
-    public int getParentIno() {
+    int getParentIno() {
         return parentIno;
     }
 
@@ -63,7 +62,7 @@ public class Dirent {
      * Get entry type.
      * @return the entry type
      */
-    public int getType() {
+    int getType() {
         return type;
     }
 
@@ -71,7 +70,7 @@ public class Dirent {
      * Get name of directory entry.
      * @return the directory name
      */
-    public String getName() {
+    String getName() {
         return name;
     }
 

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java
Tue Aug 16 03:13:32 2011
@@ -425,7 +425,7 @@ public class DumpArchiveEntry implements
      * @param buffer
      * @throws Exception
      */
-    public static DumpArchiveEntry parse(byte[] buffer) {
+    static DumpArchiveEntry parse(byte[] buffer) {
         DumpArchiveEntry entry = new DumpArchiveEntry();
         TapeSegmentHeader header = entry.header;
 
@@ -492,7 +492,7 @@ public class DumpArchiveEntry implements
     /**
      * Update entry with information from next tape segment header.
      */
-    public void update(byte[] buffer) {
+    void update(byte[] buffer) {
         header.volume = DumpArchiveUtil.convert32(buffer, 16);
         header.count = DumpArchiveUtil.convert32(buffer, 160);
 
@@ -511,7 +511,7 @@ public class DumpArchiveEntry implements
      * Archive entry as stored on tape. There is one TSH for (at most)
      * every 512k in the file.
      */
-    public static class TapeSegmentHeader {
+    static class TapeSegmentHeader {
         private DumpArchiveConstants.SEGMENT_TYPE type;
         private int volume;
         private int ino;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStream.java
Tue Aug 16 03:13:32 2011
@@ -127,7 +127,7 @@ public class DumpArchiveInputStream exte
     /**
      * Read CLRI (deleted inode) segment.
      */
-    public void readCLRI() throws IOException {
+    private void readCLRI() throws IOException {
         byte[] readBuf = raw.readRecord();
 
         if (!DumpArchiveUtil.verify(readBuf)) {
@@ -148,7 +148,7 @@ public class DumpArchiveInputStream exte
     /**
      * Read BITS segment.
      */
-    public void readBITS() throws IOException {
+    private void readBITS() throws IOException {
         byte[] readBuf = raw.readRecord();
 
         if (!DumpArchiveUtil.verify(readBuf)) {
@@ -264,7 +264,7 @@ public class DumpArchiveInputStream exte
     /**
      * Read directory entry.
      */
-    public void readDirectoryEntry(DumpArchiveEntry entry)
+    private void readDirectoryEntry(DumpArchiveEntry entry)
         throws IOException {
         long size = entry.getSize();
         boolean first = true;
@@ -351,7 +351,7 @@ public class DumpArchiveInputStream exte
      * @param entry
      * @return  full path for specified archive entry, or null if there's a gap.
      */
-    public String getPath(DumpArchiveEntry entry) {
+    private String getPath(DumpArchiveEntry entry) {
         // build the stack of elements. It's possible that we're 
         // still missing an intermediate value and if so we
         Stack<String> elements = new Stack<String>();

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveSummary.java
Tue Aug 16 03:13:32 2011
@@ -41,7 +41,7 @@ public class DumpArchiveSummary {
     private int firstrec;
     private int ntrec;
 
-    public DumpArchiveSummary(byte[] buffer) {
+    DumpArchiveSummary(byte[] buffer) {
         dumpDate = new Date(1000L * DumpArchiveUtil.convert32(buffer, 4));
         previousDumpDate = new Date(1000L * DumpArchiveUtil.convert32(buffer, 8));
         volume = DumpArchiveUtil.convert32(buffer, 12);
@@ -311,7 +311,7 @@ public class DumpArchiveSummary {
             return true;
         }
 
-        if (!(o instanceof DumpArchiveSummary)) {
+        if (!o.getClass().equals(getClass())) {
             return false;
         }
 

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
Tue Aug 16 03:13:32 2011
@@ -22,7 +22,7 @@ package org.apache.commons.compress.arch
 /**
  * Various utilities for dump archives.
  */
-public class DumpArchiveUtil {
+class DumpArchiveUtil {
     /**
      * Private constructor to prevent instantiation.
      */

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java?rev=1158092&r1=1158091&r2=1158092&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/TapeInputStream.java
Tue Aug 16 03:13:32 2011
@@ -33,7 +33,7 @@ import java.util.zip.Inflater;
  *
  * @NotThreadSafe
  */
-public class TapeInputStream extends FilterInputStream {
+class TapeInputStream extends FilterInputStream {
     private byte[] blockBuffer = new byte[DumpArchiveConstants.TP_SIZE];
     private int currBlkIdx = -1;
     private int blockSize = DumpArchiveConstants.TP_SIZE;



Mime
View raw message