~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/zip/ZipLong.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-17 07:53:06 UTC
  • mfrom: (7.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130517075306-4yt0jyr782vasejl
Tags: 1.5-1
* Team upload.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 */
18
18
package org.apache.commons.compress.archivers.zip;
19
19
 
 
20
import java.io.Serializable;
 
21
 
20
22
import static org.apache.commons.compress.archivers.zip.ZipConstants.BYTE_MASK;
21
23
import static org.apache.commons.compress.archivers.zip.ZipConstants.WORD;
22
24
 
25
27
 * rules for the big endian byte order of ZIP files.
26
28
 * @Immutable
27
29
 */
28
 
public final class ZipLong implements Cloneable {
 
30
public final class ZipLong implements Cloneable, Serializable {
 
31
    private static final long serialVersionUID = 1L;
29
32
 
30
33
    //private static final int BYTE_BIT_SIZE = 8;
31
34
 
50
53
    public static final ZipLong LFH_SIG = new ZipLong(0X04034B50L);
51
54
 
52
55
    /**
53
 
     * Data Descriptor signature
 
56
     * Data Descriptor signature.
 
57
     *
 
58
     * <p>Actually, PKWARE uses this as marker for split/spanned
 
59
     * archives and other archivers have started to use it as Data
 
60
     * Descriptor signature (as well).</p>
54
61
     * @since 1.1
55
62
     */
56
63
    public static final ZipLong DD_SIG = new ZipLong(0X08074B50L);
63
70
    static final ZipLong ZIP64_MAGIC = new ZipLong(ZipConstants.ZIP64_MAGIC);
64
71
 
65
72
    /**
 
73
     * Marks ZIP archives that were supposed to be split or spanned
 
74
     * but only needed a single segment in then end (so are actually
 
75
     * neither split nor spanned).
 
76
     *
 
77
     * <p>This is the "PK00" prefix found in some archives.</p>
 
78
     * @since 1.5
 
79
     */
 
80
    public static final ZipLong SINGLE_SEGMENT_SPLIT_MARKER =
 
81
        new ZipLong(0X30304B50L);
 
82
 
 
83
    /**
 
84
     * Archive extra data record signature.</p>
 
85
     * @since 1.5
 
86
     */
 
87
    public static final ZipLong AED_SIG = new ZipLong(0X08064B50L);
 
88
 
 
89
    /**
66
90
     * Create instance from a number.
67
91
     * @param value the long to store as a ZipLong
68
92
     */