~ubuntu-branches/ubuntu/utopic/libcommons-compress-java/utopic

« back to all changes in this revision

Viewing changes to src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2013-11-02 13:55:47 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20131102135547-nhcubj3ae7rv6t13
Tags: 1.6-1
* New upstream release
* Updated Standards-Version to 3.9.5 (no changes)
* Build depend on debhelper >= 9
* Removed the unused debian/orig-tar.sh script

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
package org.apache.commons.compress.archivers.dump;
20
20
 
 
21
import java.io.IOException;
 
22
import org.apache.commons.compress.archivers.zip.ZipEncoding;
21
23
 
22
24
/**
23
25
 * Various utilities for dump archives.
130
132
 
131
133
        return i;
132
134
    }
 
135
 
 
136
    /**
 
137
     * Decodes a byte array to a string.
 
138
     */
 
139
    static String decode(ZipEncoding encoding, byte[] b, int offset, int len)
 
140
        throws IOException {
 
141
        byte[] copy = new byte[len];
 
142
        System.arraycopy(b, offset, copy, 0, len);
 
143
        return encoding.decode(copy);
 
144
    }
133
145
}