Click here to Skip to main content
15,896,063 members
Articles / Programming Languages / Java

Encrypted Zipping of Files in C# and Java

Rate me:
Please Sign up or sign in to vote.
4.47/5 (9 votes)
14 Sep 2008CPOL3 min read 75.2K   5.3K   55  
Source code to create a compressed, encrypted password protected zip file in C# and Java
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ZipFramework;

/**
 *
 * @author Neill Harper
 */
public class Method {
    
    public static final short Stored = 0;
    public static final short Shrunk = 1;
    public static final short ReducedCompFactor1 = 2;
    public static final short ReducedCompFactor2 = 3;
    public static final short ReducedCompFactor3 = 4;
    public static final short ReducedCompFactor4 = 5;
    public static final short Imploded = 6;
    public static final short Tokenized = 7;
    public static final short Deflated = 8;
    public static final short Deflate64 = 9;
    public static final short OldImploding = 10;
    public static final short Reserved1 = 11;
    public static final short BZIP2 = 12;
    public static final short Reserved2 = 13;
    public static final short LZMA = 14;
    
    
    
    
    
    private short meth;

    public short getMethodValue() {
        return meth;
    }

    public void setMethodValue(short value) {
        this.meth = value;
    }
    
    

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Junior)
United Kingdom United Kingdom
I am an iSeries Synon/RPG programmer, who likes to program in C# and Java in my spare time.

Comments and Discussions