commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r427072 [3/5] - in /jakarta/commons/sandbox/compress/trunk: ./ src/examples/ src/examples/org/ src/examples/org/apache/ src/examples/org/apache/commons/ src/examples/org/apache/commons/compress/ src/examples/org/apache/commons/compress/exam...
Date Mon, 31 Jul 2006 10:55:13 GMT
Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+/**
+ * Simple placeholder for all those extra fields we don't want to deal with. <p>
+ *
+ * Assumes local file data and central directory entries are identical - unless
+ * told the opposite.</p>
+ *
+ * @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+public class UnrecognizedExtraField
+    implements ZipExtraField
+{
+    /**
+     * Extra field data in central directory - without Header-ID or length
+     * specifier.
+     *
+     * @since 1.1
+     */
+    private byte[] m_centralData;
+
+    /**
+     * The Header-ID.
+     *
+     * @since 1.1
+     */
+    private ZipShort m_headerID;
+
+    /**
+     * Extra field data in local file data - without Header-ID or length
+     * specifier.
+     *
+     * @since 1.1
+     */
+    private byte[] m_localData;
+
+    /**
+     * Set the central directory data
+     *
+     * @param centralData the central directory data
+     */
+    public void setCentralDirectoryData( final byte[] centralData )
+    {
+        m_centralData = centralData;
+    }
+
+       /**
+     * Set the header ID.
+     *
+     * @param headerID the header ID
+     */
+    public void setHeaderID( final ZipShort headerID )
+    {
+        m_headerID = headerID;
+    }
+
+    /**
+     * Set the local file data.
+     *
+     * @param localData the local file data
+     */
+    public void setLocalFileDataData( final byte[] localData )
+    {
+        m_localData = localData;
+    }
+
+    /**
+     * Get the central directory data.
+     *
+     * @return the central directory data.
+     */
+    public byte[] getCentralDirectoryData()
+    {
+        if( m_centralData != null )
+        {
+            return m_centralData;
+        }
+        return getLocalFileDataData();
+    }
+
+    /**
+     * Get the length of the central directory in bytes.
+     *
+     * @return the length of the central directory in bytes.
+     */
+    public ZipShort getCentralDirectoryLength()
+    {
+        if( m_centralData != null )
+        {
+            return new ZipShort( m_centralData.length );
+        }
+        return getLocalFileDataLength();
+    }
+
+    /**
+     * Get the HeaderID.
+     *
+     * @return the HeaderID
+     */
+    public ZipShort getHeaderID()
+    {
+        return m_headerID;
+    }
+
+    /**
+     * Get the local file data.
+     *
+     * @return the local file data
+     */
+    public byte[] getLocalFileDataData()
+    {
+        return m_localData;
+    }
+
+    /**
+     * Get the length of local file data in bytes.
+     *
+     * @return the length of local file data in bytes
+     */
+    public ZipShort getLocalFileDataLength()
+    {
+        return new ZipShort( m_localData.length );
+    }
+
+    /**
+     * Parse LocalFiledata out of supplied buffer.
+     *
+     * @param buffer the buffer to use
+     * @param offset the offset into buffer
+     * @param length then length of data
+     */
+    public void parseFromLocalFileData( final byte[] buffer,
+                                        final int offset,
+                                        final int length )
+    {
+        final byte[] fileData = new byte[ length ];
+        System.arraycopy( buffer, offset, fileData, 0, length );
+        setLocalFileDataData( fileData );
+    }
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.zip.ZipInputStream;
+
+import org.apache.commons.compress.AbstractArchive;
+import org.apache.commons.compress.ArchiveEntry;
+import org.apache.commons.compress.ArchiveException;
+import org.apache.commons.compress.UnpackException;
+
+/**
+ * Archive-Implementation for Zip.
+ */
+public class ZipArchive extends AbstractArchive {
+
+	/* Buffer for the file operations */
+	private static final int BUFFER = 2048;
+
+	/**
+	 * HEADER Field for this archiver.
+	 */
+	private static final byte[] HEADER = { 0x50, 0x4b, 0x03, 0x04 };
+	
+	/**
+	 * DEFAULT_FILE_EXTENSION Field for this archiver.
+	 */
+	private static String DEFAULT_FILE_EXTENSION = "zip";
+
+	/**
+	 * ARCHIVER_NAME Field for this archiver.
+	 */
+	private static final String ARCHIVER_NAME = "zip";
+	
+	/**
+	 * This Archive should be instantiated in the Archive-Interface.
+	 */
+	public ZipArchive() {
+		// Empty
+	}
+		
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Archive#unpack()
+	 */
+	protected void doUnpack(File unpackDir) throws UnpackException {
+		BufferedOutputStream destination = null;
+		FileInputStream fInputStream = null;
+		
+		try {
+			fInputStream = new FileInputStream(this.getArchive());
+		} catch(FileNotFoundException e) {
+			throw new UnpackException("SourceFile could not be found.", e);
+		}
+		ZipInputStream zInputStream = null;
+		try {
+			// TODO: we have no ZipInputStream yet, so we need the sun implementation
+			zInputStream = new ZipInputStream(new BufferedInputStream(fInputStream));
+			java.util.zip.ZipEntry entry;
+			
+			while((entry = zInputStream.getNextEntry()) != null) {
+				int count;
+				byte data[] = new byte[BUFFER];
+
+				String fosString = unpackDir.getAbsolutePath() + File.separator + entry.getName();
+				FileOutputStream fos = new FileOutputStream(fosString);
+				destination = new BufferedOutputStream(fos, BUFFER);
+				
+				while((count = zInputStream.read(data, 0, BUFFER))!= -1) {
+					destination.write(data, 0, count);
+				}
+				destination.flush();
+				destination.close();
+			}
+		} catch(IOException e) {
+			throw new UnpackException("Exception while unpacking.", e);
+		} finally {
+			try {
+				zInputStream.close();
+			} catch (IOException e1) {
+				throw new UnpackException("Exception while unpacking.", e1);
+			}
+		}
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Archive#pack()
+	 */
+	protected void doSave(FileOutputStream output) throws ArchiveException {
+		// Stream initializing
+		BufferedInputStream origin = null;
+		
+		//out.setMethod(ZipOutputStream.DEFLATED);
+		byte data[] = new byte[BUFFER];
+		
+		// get a list of filesStreams from current directory
+		// less than one file leads to an exception
+		Iterator iterator = this.getEntryIterator();
+		if(!iterator.hasNext()) {
+			throw new ArchiveException("There must be at least one file to be pack.");
+		}
+		
+		// Pack-Operation
+		ZipOutputStream out = null;
+		try {
+			out = new ZipOutputStream(new BufferedOutputStream(output));
+			while(iterator.hasNext()) {
+				ArchiveEntry archiveEntry = (ArchiveEntry)iterator.next();
+				InputStream fInputStream = archiveEntry.getStream();
+
+				origin = new BufferedInputStream(fInputStream, BUFFER);
+				ZipEntry entry = new ZipEntry(archiveEntry.getName());
+				out.putNextEntry(entry);
+			
+				int count;
+				while((count = origin.read(data, 0,	BUFFER)) != -1) {
+					out.write(data, 0, count);
+				}
+				origin.close();
+			}			
+		} catch (IOException e) {
+			throw new ArchiveException("Creation of this archive failed cause of IOExceptions.", e);
+		} finally {
+			try {
+				out.close();
+			} catch (IOException e1) {
+				throw new ArchiveException("Creation of this archive failed cause of IOExceptions.", e1);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Archive#getArchiverName()
+	 */
+	public String getName() {
+		return ARCHIVER_NAME;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Archive#getDefaultFileExtension()
+	 */
+	public String getDefaultFileExtension() {
+		return DEFAULT_FILE_EXTENSION;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Archive#getHeader()
+	 */
+	public byte[] getHeader() {
+		return HEADER;
+	}
+}
\ No newline at end of file

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipArchive.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,451 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.zip.ZipException;
+
+/**
+ * Extension that adds better handling of extra fields and provides access to
+ * the internal and external file attributes.
+ *
+ * @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+public class ZipEntry
+    extends java.util.zip.ZipEntry
+{
+    /**
+     * Helper for JDK 1.1
+     *
+     * @since 1.2
+     */
+    private static Method c_setCompressedSizeMethod;
+
+    /**
+     * Helper for JDK 1.1
+     *
+     * @since 1.2
+     */
+    private static final Object c_lockReflection = new Object();
+
+    /**
+     * Helper for JDK 1.1
+     *
+     * @since 1.2
+     */
+    private static boolean c_triedToGetMethod;
+
+    private final ArrayList m_extraFields = new ArrayList();
+
+    private int m_internalAttributes;
+    private long m_externalAttributes;
+
+    /**
+     * Helper for JDK 1.1 <-> 1.2 incompatibility.
+     *
+     * @since 1.2
+     */
+    private Long m_compressedSize;
+
+    /**
+     * Creates a new zip entry with the specified name.
+     *
+     * @param name the name of entry
+     * @since 1.1
+     */
+    public ZipEntry( final String name )
+    {
+        super( name );
+    }
+
+    /**
+     * Creates a new zip entry with fields taken from the specified zip entry.
+     *
+     * @param entry the JDK ZipEntry to adapt
+     * @exception ZipException if can not create entry
+     * @since 1.1
+     */
+    public ZipEntry( java.util.zip.ZipEntry entry )
+        throws ZipException
+    {
+        /*
+         * REVISIT: call super(entry) instead of this stuff in Ant2,
+         * "copy constructor" has not been available in JDK 1.1
+         */
+        super( entry.getName() );
+
+        setComment( entry.getComment() );
+        setMethod( entry.getMethod() );
+        setTime( entry.getTime() );
+
+        final long size = entry.getSize();
+        if( size > 0 )
+        {
+            setSize( size );
+        }
+
+        final long cSize = entry.getCompressedSize();
+        if( cSize > 0 )
+        {
+            setComprSize( cSize );
+        }
+
+        final long crc = entry.getCrc();
+        if( crc > 0 )
+        {
+            setCrc( crc );
+        }
+
+        final byte[] extra = entry.getExtra();
+        if( extra != null )
+        {
+            setExtraFields( ExtraFieldUtils.parse( extra ) );
+        }
+        else
+        {
+            // initializes extra data to an empty byte array
+            setExtra();
+        }
+    }
+
+    /**
+     * Creates a new zip entry with fields taken from the specified zip entry.
+     *
+     * @param entry the entry to adapt
+     * @exception ZipException if can not create entry
+     * @since 1.1
+     */
+    public ZipEntry( final ZipEntry entry )
+        throws ZipException
+    {
+        this( (java.util.zip.ZipEntry)entry );
+        setInternalAttributes( entry.getInternalAttributes() );
+        setExternalAttributes( entry.getExternalAttributes() );
+        setExtraFields( entry.getExtraFields() );
+    }
+
+    /**
+     * Try to get a handle to the setCompressedSize method.
+     *
+     * @since 1.2
+     */
+    private static void checkSCS()
+    {
+        if( !c_triedToGetMethod )
+        {
+            synchronized( c_lockReflection )
+            {
+                c_triedToGetMethod = true;
+                try
+                {
+                    c_setCompressedSizeMethod =
+                        java.util.zip.ZipEntry.class.getMethod( "setCompressedSize",
+                                                                new Class[]{Long.TYPE} );
+                }
+                catch( NoSuchMethodException nse )
+                {
+                }
+            }
+        }
+    }
+
+    /**
+     * Are we running JDK 1.2 or higher?
+     *
+     * @return Description of the Returned Value
+     * @since 1.2
+     */
+    private static boolean haveSetCompressedSize()
+    {
+        checkSCS();
+        return c_setCompressedSizeMethod != null;
+    }
+
+    /**
+     * Invoke setCompressedSize via reflection.
+     *
+     * @param entry Description of Parameter
+     * @param size Description of Parameter
+     * @since 1.2
+     */
+    private static void performSetCompressedSize( final ZipEntry entry,
+                                                  final long size )
+    {
+        final Long[] s = {new Long( size )};
+        try
+        {
+            c_setCompressedSizeMethod.invoke( entry, s );
+        }
+        catch( final InvocationTargetException ite )
+        {
+            final Throwable nested = ite.getTargetException();
+            final String message = "Exception setting the compressed size " +
+                "of " + entry + ": " + nested.getMessage();
+            throw new RuntimeException( message );
+        }
+        catch( final Throwable t )
+        {
+            final String message = "Exception setting the compressed size " +
+                "of " + entry + ": " + t.getMessage();
+            throw new RuntimeException( message );
+        }
+    }
+
+    /**
+     * Make this class work in JDK 1.1 like a 1.2 class. <p>
+     *
+     * This either stores the size for later usage or invokes setCompressedSize
+     * via reflection.</p>
+     *
+     * @param size The new ComprSize value
+     * @since 1.2
+     */
+    public void setComprSize( final long size )
+    {
+        if( haveSetCompressedSize() )
+        {
+            performSetCompressedSize( this, size );
+        }
+        else
+        {
+            m_compressedSize = new Long( size );
+        }
+    }
+
+    /**
+     * Sets the external file attributes.
+     *
+     * @param externalAttributes The new ExternalAttributes value
+     * @since 1.1
+     */
+    public void setExternalAttributes( final long externalAttributes )
+    {
+        m_externalAttributes = externalAttributes;
+    }
+
+    /**
+     * Throws an Exception if extra data cannot be parsed into extra fields.
+     *
+     * @param extra The new Extra value
+     * @throws RuntimeException if fail to set extra data
+     * @since 1.1
+     */
+    public void setExtra( final byte[] extra )
+        throws RuntimeException
+    {
+        try
+        {
+            setExtraFields( ExtraFieldUtils.parse( extra ) );
+        }
+        catch( final Exception e )
+        {
+            throw new RuntimeException( e.getMessage() );
+        }
+    }
+
+    /**
+     * Replaces all currently attached extra fields with the new array.
+     *
+     * @param fields The new ExtraFields value
+     * @since 1.1
+     */
+    public void setExtraFields( final ZipExtraField[] fields )
+    {
+        m_extraFields.clear();
+        for( int i = 0; i < fields.length; i++ )
+        {
+            m_extraFields.add( fields[ i ] );
+        }
+        setExtra();
+    }
+
+    /**
+     * Sets the internal file attributes.
+     *
+     * @param value The new InternalAttributes value
+     * @since 1.1
+     */
+    public void setInternalAttributes( final int value )
+    {
+        m_internalAttributes = value;
+    }
+
+    /**
+     * Retrieves the extra data for the central directory.
+     *
+     * @return The CentralDirectoryExtra value
+     * @since 1.1
+     */
+    public byte[] getCentralDirectoryExtra()
+    {
+        return ExtraFieldUtils.mergeCentralDirectoryData( getExtraFields() );
+    }
+
+    /**
+     * Override to make this class work in JDK 1.1 like a 1.2 class.
+     *
+     * @return The CompressedSize value
+     * @since 1.2
+     */
+    public long getCompressedSize()
+    {
+        if( m_compressedSize != null )
+        {
+            // has been set explicitly and we are running in a 1.1 VM
+            return m_compressedSize.longValue();
+        }
+        return super.getCompressedSize();
+    }
+
+    /**
+     * Retrieves the external file attributes.
+     *
+     * @return The ExternalAttributes value
+     * @since 1.1
+     */
+    public long getExternalAttributes()
+    {
+        return m_externalAttributes;
+    }
+
+    /**
+     * Retrieves extra fields.
+     *
+     * @return The ExtraFields value
+     * @since 1.1
+     */
+    public ZipExtraField[] getExtraFields()
+    {
+        final ZipExtraField[] result = new ZipExtraField[ m_extraFields.size() ];
+        return (ZipExtraField[])m_extraFields.toArray( result );
+    }
+
+    /**
+     * Retrieves the internal file attributes.
+     *
+     * @return The InternalAttributes value
+     * @since 1.1
+     */
+    public int getInternalAttributes()
+    {
+        return m_internalAttributes;
+    }
+
+    /**
+     * Retrieves the extra data for the local file data.
+     *
+     * @return The LocalFileDataExtra value
+     * @since 1.1
+     */
+    public byte[] getLocalFileDataExtra()
+    {
+        byte[] extra = getExtra();
+        return extra != null ? extra : new byte[ 0 ];
+    }
+
+    /**
+     * Adds an extra fields - replacing an already present extra field of the
+     * same type.
+     *
+     * @param extraField The feature to be added to the ExtraField attribute
+     * @since 1.1
+     */
+    public void addExtraField( final ZipExtraField extraField )
+    {
+        final ZipShort type = extraField.getHeaderID();
+        boolean done = false;
+        for( int i = 0; !done && i < m_extraFields.size(); i++ )
+        {
+            final ZipExtraField other = (ZipExtraField)m_extraFields.get( i );
+            if( other.getHeaderID().equals( type ) )
+            {
+                m_extraFields.set( i, extraField );
+                done = true;
+            }
+        }
+        if( !done )
+        {
+            m_extraFields.add( extraField );
+        }
+        setExtra();
+    }
+
+    /**
+     * Overwrite clone
+     *
+     * @return Description of the Returned Value
+     * @since 1.1
+     */
+    public Object clone()
+    {
+        ZipEntry entry = null;
+        try
+        {
+            entry = new ZipEntry( (java.util.zip.ZipEntry)super.clone() );
+        }
+        catch( final Exception e )
+        {
+            // impossible as extra data is in correct format
+            e.printStackTrace();
+            return null;
+        }
+
+        entry.setInternalAttributes( getInternalAttributes() );
+        entry.setExternalAttributes( getExternalAttributes() );
+        entry.setExtraFields( getExtraFields() );
+        return entry;
+    }
+
+    /**
+     * Remove an extra fields.
+     *
+     * @param type Description of Parameter
+     * @since 1.1
+     */
+    public void removeExtraField( final ZipShort type )
+    {
+        boolean done = false;
+        for( int i = 0; !done && i < m_extraFields.size(); i++ )
+        {
+            if( ( (ZipExtraField)m_extraFields.get( i ) ).getHeaderID().equals( type ) )
+            {
+                m_extraFields.remove( i );
+                done = true;
+            }
+        }
+        if( !done )
+        {
+            throw new java.util.NoSuchElementException();
+        }
+        setExtra();
+    }
+
+    /**
+     * Unfortunately {@link java.util.zip.ZipOutputStream
+     * java.util.zip.ZipOutputStream} seems to access the extra data directly,
+     * so overriding getExtra doesn't help - we need to modify super's data
+     * directly.
+     *
+     * @since 1.1
+     */
+    protected void setExtra()
+    {
+        super.setExtra( ExtraFieldUtils.mergeLocalFileDataData( getExtraFields() ) );
+    }
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipEntry.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+import java.util.zip.ZipException;
+
+/**
+ * General format of extra field data. <p>
+ *
+ * Extra fields usually appear twice per file, once in the local file data and
+ * once in the central directory. Usually they are the same, but they don't have
+ * to be. {@link java.util.zip.ZipOutputStream java.util.zip.ZipOutputStream}
+ * will only use the local file data in both places.</p>
+ *
+ * @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+public interface ZipExtraField
+{
+    /**
+     * The Header-ID.
+     *
+     * @return The HeaderId value
+     * @since 1.1
+     */
+    ZipShort getHeaderID();
+
+    /**
+     * Length of the extra field in the local file data - without Header-ID or
+     * length specifier.
+     *
+     * @return The LocalFileDataLength value
+     * @since 1.1
+     */
+    ZipShort getLocalFileDataLength();
+
+    /**
+     * Length of the extra field in the central directory - without Header-ID or
+     * length specifier.
+     *
+     * @return The CentralDirectoryLength value
+     * @since 1.1
+     */
+    ZipShort getCentralDirectoryLength();
+
+    /**
+     * The actual data to put into local file data - without Header-ID or length
+     * specifier.
+     *
+     * @return The LocalFileDataData value
+     * @since 1.1
+     */
+    byte[] getLocalFileDataData();
+
+    /**
+     * The actual data to put central directory - without Header-ID or length
+     * specifier.
+     *
+     * @return The CentralDirectoryData value
+     * @since 1.1
+     */
+    byte[] getCentralDirectoryData();
+
+    /**
+     * Populate data from this array as if it was in local file data.
+     *
+     * @param buffer the buffer to read data from
+     * @param offset offset into buffer to read data
+     * @param length the length of data
+     * @exception ZipException on error
+     * @since 1.1
+     */
+    void parseFromLocalFileData( byte[] buffer, int offset, int length )
+        throws ZipException;
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+/**
+ * Utility class that represents a four byte integer with conversion rules for
+ * the big endian byte order of ZIP files.
+ *
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+public final class ZipLong implements Cloneable
+{
+    private long m_value;
+
+    /**
+     * Create instance from a number.
+     *
+     * @param value the value
+     * @since 1.1
+     */
+    public ZipLong( final long value )
+    {
+        m_value = value;
+    }
+
+    /**
+     * Create instance from bytes.
+     *
+     * @param buffer the buffer to read data from
+     * @since 1.1
+     */
+    public ZipLong( final byte[] buffer )
+    {
+        this( buffer, 0 );
+    }
+
+    /**
+     * Create instance from the four bytes starting at offset.
+     *
+     * @param buffer buffer to read data from
+     * @param offset offset into buffer
+     * @since 1.1
+     */
+    public ZipLong( final byte[] buffer, final int offset )
+    {
+        m_value = ( buffer[ offset + 3 ] << 24 ) & 0xFF000000l;
+        m_value += ( buffer[ offset + 2 ] << 16 ) & 0xFF0000;
+        m_value += ( buffer[ offset + 1 ] << 8 ) & 0xFF00;
+        m_value += ( buffer[ offset ] & 0xFF );
+    }
+
+    /**
+     * Get value as two bytes in big endian byte order.
+     *
+     * @return The value as bytes
+     * @since 1.1
+     */
+    public byte[] getBytes()
+    {
+        byte[] result = new byte[ 4 ];
+        result[ 0 ] = (byte)( ( m_value & 0xFF ) );
+        result[ 1 ] = (byte)( ( m_value & 0xFF00 ) >> 8 );
+        result[ 2 ] = (byte)( ( m_value & 0xFF0000 ) >> 16 );
+        result[ 3 ] = (byte)( ( m_value & 0xFF000000l ) >> 24 );
+        return result;
+    }
+
+    /**
+     * Get value as Java int.
+     *
+     * @return The value
+     * @since 1.1
+     */
+    public long getValue()
+    {
+        return m_value;
+    }
+
+    /**
+     * Override to make two instances with same value equal.
+     *
+     * @param o the object to compare against
+     * @return true if equyal, false otherwise
+     * @since 1.1
+     */
+    public boolean equals( final Object o )
+    {
+        if( o == null || !( o instanceof ZipLong ) )
+        {
+            return false;
+        }
+        return m_value == ( (ZipLong)o ).getValue();
+    }
+
+    /**
+     * Override to make two instances with same value equal.
+     *
+     * @return the hashcode
+     * @since 1.1
+     */
+    public int hashCode()
+    {
+        return (int)m_value;
+    }
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipLong.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,728 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Calendar;
+import java.util.Hashtable;
+import java.util.zip.CRC32;
+import java.util.zip.Deflater;
+import java.util.zip.DeflaterOutputStream;
+import java.util.zip.ZipException;
+
+/**
+ * Reimplementation of {@link java.util.zip.ZipOutputStream
+ * java.util.zip.ZipOutputStream} that does handle the extended functionality of
+ * this package, especially internal/external file attributes and extra fields
+ * with different layouts for local file data and central directory entries. <p>
+ *
+ * This implementation will use a Data Descriptor to store size and CRC
+ * information for DEFLATED entries, this means, you don't need to calculate
+ * them yourself. Unfortunately this is not possible for the STORED method, here
+ * setting the CRC and uncompressed size information is required before {@link
+ * #putNextEntry putNextEntry} will be called.</p>
+ *
+ * @author <a href="stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+class ZipOutputStream
+    extends DeflaterOutputStream
+{
+    /**
+     * Helper, a 0 as ZipShort.
+     *
+     * @since 1.1
+     */
+    private static final byte[] ZERO = {0, 0};
+
+    /**
+     * Helper, a 0 as ZipLong.
+     *
+     * @since 1.1
+     */
+    private static final byte[] LZERO = {0, 0, 0, 0};
+
+    /**
+     * Compression method for deflated entries.
+     *
+     * @since 1.1
+     */
+    public static final int DEFLATED = ZipEntry.DEFLATED;
+
+    /**
+     * Compression method for deflated entries.
+     *
+     * @since 1.1
+     */
+    public static final int STORED = ZipEntry.STORED;
+
+    /*
+     * Various ZIP constants
+     */
+    /**
+     * local file header signature
+     *
+     * @since 1.1
+     */
+    protected static final ZipLong LFH_SIG = new ZipLong( 0X04034B50L );
+    /**
+     * data descriptor signature
+     *
+     * @since 1.1
+     */
+    protected static final ZipLong DD_SIG = new ZipLong( 0X08074B50L );
+    /**
+     * central file header signature
+     *
+     * @since 1.1
+     */
+    protected static final ZipLong CFH_SIG = new ZipLong( 0X02014B50L );
+    /**
+     * end of central dir signature
+     *
+     * @since 1.1
+     */
+    protected static final ZipLong EOCD_SIG = new ZipLong( 0X06054B50L );
+
+    /**
+     * Smallest date/time ZIP can handle.
+     *
+     * @since 1.1
+     */
+    private static final ZipLong DOS_TIME_MIN = new ZipLong( 0x00002100L );
+
+    /**
+     * The file comment.
+     *
+     * @since 1.1
+     */
+    private String m_comment = "";
+
+    /**
+     * Compression level for next entry.
+     *
+     * @since 1.1
+     */
+    private int m_level = Deflater.DEFAULT_COMPRESSION;
+
+    /**
+     * Default compression method for next entry.
+     *
+     * @since 1.1
+     */
+    private int m_method = DEFLATED;
+
+    /**
+     * List of ZipEntries written so far.
+     *
+     * @since 1.1
+     */
+    private final ArrayList m_entries = new ArrayList();
+
+    /**
+     * CRC instance to avoid parsing DEFLATED data twice.
+     *
+     * @since 1.1
+     */
+    private final CRC32 m_crc = new CRC32();
+
+    /**
+     * Count the bytes written to out.
+     *
+     * @since 1.1
+     */
+    private long m_written;
+
+    /**
+     * Data for current entry started here.
+     *
+     * @since 1.1
+     */
+    private long m_dataStart;
+
+    /**
+     * Start of central directory.
+     *
+     * @since 1.1
+     */
+    private ZipLong m_cdOffset = new ZipLong( 0 );
+
+    /**
+     * Length of central directory.
+     *
+     * @since 1.1
+     */
+    private ZipLong m_cdLength = new ZipLong( 0 );
+
+    /**
+     * Holds the offsets of the LFH starts for each entry
+     *
+     * @since 1.1
+     */
+    private final Hashtable m_offsets = new Hashtable();
+
+    /**
+     * The encoding to use for filenames and the file comment. <p>
+     *
+     * For a list of possible values see <a
+     * href="http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html">
+     * http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html
+     * </a>. Defaults to the platform's default character encoding.</p>
+     *
+     * @since 1.3
+     */
+    private String m_encoding;
+
+    /**
+     * Current entry.
+     *
+     * @since 1.1
+     */
+    private ZipEntry m_entry;
+
+    /**
+     * Creates a new ZIP OutputStream filtering the underlying stream.
+     *
+     * @param output the output stream to write to
+     * @since 1.1
+     */
+    public ZipOutputStream( final OutputStream output )
+    {
+        super( output, new Deflater( Deflater.DEFAULT_COMPRESSION, true ) );
+    }
+
+    /**
+     * Convert a Date object to a DOS date/time field. <p>
+     *
+     * Stolen from InfoZip's <code>fileio.c</code></p>
+     *
+     * @param time Description of Parameter
+     * @return Description of the Returned Value
+     * @since 1.1
+     */
+    protected static ZipLong toDosTime( Date time )
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime( time );
+        int year = cal.get(Calendar.YEAR);
+        int month = cal.get(Calendar.MONTH) + 1;
+        if( year < 1980 )
+        {
+            return DOS_TIME_MIN;
+        }
+        long value = ( ( year - 1980 ) << 25 )
+            | ( month << 21 )
+            | ( cal.get(Calendar.DAY_OF_MONTH) << 16 )
+            | ( cal.get(Calendar.HOUR_OF_DAY) << 11 )
+            | ( cal.get(Calendar.MINUTE) << 5 )
+            | ( cal.get(Calendar.SECOND) >> 1 );
+
+        byte[] result = new byte[ 4 ];
+        result[ 0 ] = (byte)( ( value & 0xFF ) );
+        result[ 1 ] = (byte)( ( value & 0xFF00 ) >> 8 );
+        result[ 2 ] = (byte)( ( value & 0xFF0000 ) >> 16 );
+        result[ 3 ] = (byte)( ( value & 0xFF000000l ) >> 24 );
+        return new ZipLong( result );
+    }
+
+    /**
+     * Set the file comment.
+     *
+     * @param comment The new Comment value
+     * @since 1.1
+     */
+    public void setComment( String comment )
+    {
+        m_comment = comment;
+    }
+
+    /**
+     * The encoding to use for filenames and the file comment. <p>
+     *
+     * For a list of possible values see <a
+     * href="http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html">
+     * http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html
+     * </a>. Defaults to the platform's default character encoding.</p>
+     *
+     * @param encoding The new Encoding value
+     * @since 1.3
+     */
+    public void setEncoding( String encoding )
+    {
+        m_encoding = encoding;
+    }
+
+    /**
+     * Sets the compression level for subsequent entries. <p>
+     *
+     * Default is Deflater.DEFAULT_COMPRESSION.</p>
+     *
+     * @param level The new Level value
+     * @since 1.1
+     */
+    public void setLevel( int level )
+    {
+        m_level = level;
+    }
+
+    /**
+     * Sets the default compression method for subsequent entries. <p>
+     *
+     * Default is DEFLATED.</p>
+     *
+     * @param method The new Method value
+     * @since 1.1
+     */
+    public void setMethod( final int method )
+    {
+        m_method = method;
+    }
+
+    /**
+     * The encoding to use for filenames and the file comment.
+     *
+     * @return null if using the platform's default character encoding.
+     * @since 1.3
+     */
+    public String getEncoding()
+    {
+        return m_encoding;
+    }
+
+    /**
+     * Writes all necessary data for this entry.
+     *
+     * @throws IOException if an IO failure causes operation to fail
+     * @since 1.1
+     */
+    public void closeEntry()
+        throws IOException
+    {
+        if( m_entry == null )
+        {
+            return;
+        }
+
+        long realCrc = m_crc.getValue();
+        m_crc.reset();
+
+        if( m_entry.getMethod() == DEFLATED )
+        {
+            def.finish();
+            while( !def.finished() )
+            {
+                deflate();
+            }
+
+            m_entry.setSize( def.getTotalIn() );
+            m_entry.setComprSize( def.getTotalOut() );
+            m_entry.setCrc( realCrc );
+
+            def.reset();
+
+            m_written += m_entry.getCompressedSize();
+        }
+        else
+        {
+            if( m_entry.getCrc() != realCrc )
+            {
+                throw new ZipException( "bad CRC checksum for entry "
+                                        + m_entry.getName() + ": "
+                                        + Long.toHexString( m_entry.getCrc() )
+                                        + " instead of "
+                                        + Long.toHexString( realCrc ) );
+            }
+
+            if( m_entry.getSize() != m_written - m_dataStart )
+            {
+                throw new ZipException( "bad size for entry "
+                                        + m_entry.getName() + ": "
+                                        + m_entry.getSize()
+                                        + " instead of "
+                                        + ( m_written - m_dataStart ) );
+            }
+
+        }
+
+        writeDataDescriptor( m_entry );
+        m_entry = null;
+    }
+
+    /*
+     * Found out by experiment, that DeflaterOutputStream.close()
+     * will call finish() - so we don't need to override close
+     * ourselves.
+     */
+    /**
+     * Finishs writing the contents and closes this as well as the underlying
+     * stream.
+     *
+     * @throws IOException if an IO failure causes operation to fail
+     * @since 1.1
+     */
+    public void finish()
+        throws IOException
+    {
+        closeEntry();
+        m_cdOffset = new ZipLong( m_written );
+        final int size = m_entries.size();
+        for( int i = 0; i < size; i++ )
+        {
+            final ZipEntry entry = (ZipEntry)m_entries.get( i );
+            writeCentralFileHeader( entry );
+        }
+        m_cdLength = new ZipLong( m_written - m_cdOffset.getValue() );
+        writeCentralDirectoryEnd();
+        m_offsets.clear();
+        m_entries.clear();
+    }
+
+    /**
+     * Begin writing next entry.
+     *
+     * @param entry the entry
+     * @throws IOException if an IO failure causes operation to fail
+     * @since 1.1
+     */
+    public void putNextEntry( final ZipEntry entry )
+        throws IOException
+    {
+        closeEntry();
+
+        m_entry = entry;
+        m_entries.add( m_entry );
+
+        if( m_entry.getMethod() == -1 )
+        {// not specified
+            m_entry.setMethod( m_method );
+        }
+
+        if( m_entry.getTime() == -1 )
+        {// not specified
+            m_entry.setTime( System.currentTimeMillis() );
+        }
+
+        if( m_entry.getMethod() == STORED )
+        {
+            if( m_entry.getSize() == -1 )
+            {
+                throw new ZipException( "uncompressed size is required for STORED method" );
+            }
+            if( m_entry.getCrc() == -1 )
+            {
+                throw new ZipException( "crc checksum is required for STORED method" );
+            }
+            m_entry.setComprSize( m_entry.getSize() );
+        }
+        else
+        {
+            def.setLevel( m_level );
+        }
+        writeLocalFileHeader( m_entry );
+    }
+
+    /**
+     * Writes bytes to ZIP entry. <p>
+     *
+     * Override is necessary to support STORED entries, as well as calculationg
+     * CRC automatically for DEFLATED entries.</p>
+     *
+     * @param buffer the buffer to write to
+     * @param offset the offset to write to
+     * @param length the length of data to write
+     * @exception IOException if an IO error causes operation to fail
+     */
+    public void write( final byte[] buffer,
+                       final int offset,
+                       final int length )
+        throws IOException
+    {
+        if( m_entry.getMethod() == DEFLATED )
+        {
+            super.write( buffer, offset, length );
+        }
+        else
+        {
+            out.write( buffer, offset, length );
+            m_written += length;
+        }
+        m_crc.update( buffer, offset, length );
+    }
+
+    /**
+     * Retrieve the bytes for the given String in the encoding set for this
+     * Stream.
+     *
+     * @param name the name to decode
+     * @return the bytes for string
+     * @exception ZipException if fail to retrieve bytes for specified string
+     * @since 1.3
+     */
+    protected byte[] getBytes( String name )
+        throws ZipException
+    {
+        if( m_encoding == null )
+        {
+            return name.getBytes();
+        }
+        else
+        {
+            try
+            {
+                return name.getBytes( m_encoding );
+            }
+            catch( UnsupportedEncodingException uee )
+            {
+                throw new ZipException( uee.getMessage() );
+            }
+        }
+    }
+
+    /**
+     * Writes the &quot;End of central dir record&quot;
+     *
+     * @exception IOException when an IO erro causes operation to fail
+     * @since 1.1
+     */
+    protected void writeCentralDirectoryEnd()
+        throws IOException
+    {
+        out.write( EOCD_SIG.getBytes() );
+
+        // disk numbers
+        out.write( ZERO );
+        out.write( ZERO );
+
+        // number of entries
+        byte[] num = ( new ZipShort( m_entries.size() ) ).getBytes();
+        out.write( num );
+        out.write( num );
+
+        // length and location of CD
+        out.write( m_cdLength.getBytes() );
+        out.write( m_cdOffset.getBytes() );
+
+        // ZIP file comment
+        byte[] data = getBytes( m_comment );
+        out.write( ( new ZipShort( data.length ) ).getBytes() );
+        out.write( data );
+    }
+
+    /**
+     * Writes the central file header entry
+     *
+     * @param entry the zip entry
+     * @throws IOException when an IO error causes operation to fail
+     * @since 1.1
+     */
+    protected void writeCentralFileHeader( final ZipEntry entry )
+        throws IOException
+    {
+        out.write( CFH_SIG.getBytes() );
+        m_written += 4;
+
+        // version made by
+        out.write( ( new ZipShort( 20 ) ).getBytes() );
+        m_written += 2;
+
+        // version needed to extract
+        // general purpose bit flag
+        if( entry.getMethod() == DEFLATED )
+        {
+            // requires version 2 as we are going to store length info
+            // in the data descriptor
+            out.write( ( new ZipShort( 20 ) ).getBytes() );
+
+            // bit3 set to signal, we use a data descriptor
+            out.write( ( new ZipShort( 8 ) ).getBytes() );
+        }
+        else
+        {
+            out.write( ( new ZipShort( 10 ) ).getBytes() );
+            out.write( ZERO );
+        }
+        m_written += 4;
+
+        // compression method
+        out.write( ( new ZipShort( entry.getMethod() ) ).getBytes() );
+        m_written += 2;
+
+        // last mod. time and date
+        out.write( toDosTime( new Date( entry.getTime() ) ).getBytes() );
+        m_written += 4;
+
+        // CRC
+        // compressed length
+        // uncompressed length
+        out.write( ( new ZipLong( entry.getCrc() ) ).getBytes() );
+        out.write( ( new ZipLong( entry.getCompressedSize() ) ).getBytes() );
+        out.write( ( new ZipLong( entry.getSize() ) ).getBytes() );
+        m_written += 12;
+
+        // file name length
+        byte[] name = getBytes( entry.getName() );
+        out.write( ( new ZipShort( name.length ) ).getBytes() );
+        m_written += 2;
+
+        // extra field length
+        byte[] extra = entry.getCentralDirectoryExtra();
+        out.write( ( new ZipShort( extra.length ) ).getBytes() );
+        m_written += 2;
+
+        // file comment length
+        String comm = entry.getComment();
+        if( comm == null )
+        {
+            comm = "";
+        }
+        byte[] comment = getBytes( comm );
+        out.write( ( new ZipShort( comment.length ) ).getBytes() );
+        m_written += 2;
+
+        // disk number start
+        out.write( ZERO );
+        m_written += 2;
+
+        // internal file attributes
+        out.write( ( new ZipShort( entry.getInternalAttributes() ) ).getBytes() );
+        m_written += 2;
+
+        // external file attributes
+        out.write( ( new ZipLong( entry.getExternalAttributes() ) ).getBytes() );
+        m_written += 4;
+
+        // relative offset of LFH
+        out.write( ( (ZipLong)m_offsets.get( entry ) ).getBytes() );
+        m_written += 4;
+
+        // file name
+        out.write( name );
+        m_written += name.length;
+
+        // extra field
+        out.write( extra );
+        m_written += extra.length;
+
+        // file comment
+        out.write( comment );
+        m_written += comment.length;
+    }
+
+    /**
+     * Writes the data descriptor entry
+     *
+     * @param ze Description of Parameter
+     * @throws IOException if an IO failure causes operation to fail
+     * @since 1.1
+     */
+    protected void writeDataDescriptor( ZipEntry ze )
+        throws IOException
+    {
+        if( ze.getMethod() != DEFLATED )
+        {
+            return;
+        }
+        out.write( DD_SIG.getBytes() );
+        out.write( ( new ZipLong( m_entry.getCrc() ) ).getBytes() );
+        out.write( ( new ZipLong( m_entry.getCompressedSize() ) ).getBytes() );
+        out.write( ( new ZipLong( m_entry.getSize() ) ).getBytes() );
+        m_written += 16;
+    }
+
+    /**
+     * Writes the local file header entry
+     *
+     * @param entry the zip entry
+     * @exception IOException when an IO error causes operation to fail
+     * @since 1.1
+     */
+    protected void writeLocalFileHeader( final ZipEntry entry )
+        throws IOException
+    {
+        m_offsets.put( entry, new ZipLong( m_written ) );
+
+        out.write( LFH_SIG.getBytes() );
+        m_written += 4;
+
+        // version needed to extract
+        // general purpose bit flag
+        if( entry.getMethod() == DEFLATED )
+        {
+            // requires version 2 as we are going to store length info
+            // in the data descriptor
+            out.write( ( new ZipShort( 20 ) ).getBytes() );
+
+            // bit3 set to signal, we use a data descriptor
+            out.write( ( new ZipShort( 8 ) ).getBytes() );
+        }
+        else
+        {
+            out.write( ( new ZipShort( 10 ) ).getBytes() );
+            out.write( ZERO );
+        }
+        m_written += 4;
+
+        // compression method
+        out.write( ( new ZipShort( entry.getMethod() ) ).getBytes() );
+        m_written += 2;
+
+        // last mod. time and date
+        out.write( toDosTime( new Date( entry.getTime() ) ).getBytes() );
+        m_written += 4;
+
+        // CRC
+        // compressed length
+        // uncompressed length
+        if( entry.getMethod() == DEFLATED )
+        {
+            out.write( LZERO );
+            out.write( LZERO );
+            out.write( LZERO );
+        }
+        else
+        {
+            out.write( ( new ZipLong( entry.getCrc() ) ).getBytes() );
+            out.write( ( new ZipLong( entry.getSize() ) ).getBytes() );
+            out.write( ( new ZipLong( entry.getSize() ) ).getBytes() );
+        }
+        m_written += 12;
+
+        // file name length
+        byte[] name = getBytes( entry.getName() );
+        out.write( ( new ZipShort( name.length ) ).getBytes() );
+        m_written += 2;
+
+        // extra field length
+        byte[] extra = entry.getLocalFileDataExtra();
+        out.write( ( new ZipShort( extra.length ) ).getBytes() );
+        m_written += 2;
+
+        // file name
+        out.write( name );
+        m_written += name.length;
+
+        // extra field
+        out.write( extra );
+        m_written += extra.length;
+
+        m_dataStart = m_written;
+    }
+
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.archivers.zip;
+
+/**
+ * Utility class that represents a two byte integer with conversion rules for
+ * the big endian byte order of ZIP files.
+ *
+ * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
+ * @version $Revision: 155439 $
+ */
+public final class ZipShort implements Cloneable
+{
+    private int m_value;
+
+    /**
+     * Create instance from a number.
+     *
+     * @param value Description of Parameter
+     * @since 1.1
+     */
+    public ZipShort( int value )
+    {
+        this.m_value = value;
+    }
+
+    /**
+     * Create instance from bytes.
+     *
+     * @param bytes Description of Parameter
+     * @since 1.1
+     */
+    public ZipShort( byte[] bytes )
+    {
+        this( bytes, 0 );
+    }
+
+    /**
+     * Create instance from the two bytes starting at offset.
+     *
+     * @param bytes Description of Parameter
+     * @param offset Description of Parameter
+     * @since 1.1
+     */
+    public ZipShort( byte[] bytes, int offset )
+    {
+        m_value = ( bytes[ offset + 1 ] << 8 ) & 0xFF00;
+        m_value += ( bytes[ offset ] & 0xFF );
+    }
+
+    /**
+     * Get value as two bytes in big endian byte order.
+     *
+     * @return The Bytes value
+     * @since 1.1
+     */
+    public byte[] getBytes()
+    {
+        byte[] result = new byte[ 2 ];
+        result[ 0 ] = (byte)( m_value & 0xFF );
+        result[ 1 ] = (byte)( ( m_value & 0xFF00 ) >> 8 );
+        return result;
+    }
+
+    /**
+     * Get value as Java int.
+     *
+     * @return The Value value
+     * @since 1.1
+     */
+    public int getValue()
+    {
+        return m_value;
+    }
+
+    /**
+     * Override to make two instances with same value equal.
+     *
+     * @param o Description of Parameter
+     * @return Description of the Returned Value
+     * @since 1.1
+     */
+    public boolean equals( Object o )
+    {
+        if( o == null || !( o instanceof ZipShort ) )
+        {
+            return false;
+        }
+        return m_value == ( (ZipShort)o ).getValue();
+    }
+
+    /**
+     * Override to make two instances with same value equal.
+     *
+     * @return Description of the Returned Value
+     * @since 1.1
+     */
+    public int hashCode()
+    {
+        return m_value;
+    }
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/ZipShort.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html Mon Jul 31 03:55:10 2006
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <title></title>
+</head>
+       <body>
+<p>         Zip Utilities that extend JDK zip classes by adding better  
+      handling of extra fields. The utility classes also provide        
+access to the internal and external file attributes. These utility
+classes originated in the Ant project.<br>
+       </p>
+ <br>
+</body>
+</html>

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/archivers/zip/package.html
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.compress.compressors.bzip2;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.commons.compress.AbstractCompressor;
+import org.apache.commons.compress.CompressException;
+import org.apache.commons.compress.CompressUtils;
+/**
+ * Implementation of the Compressor Interface for BZip2. 
+ * 
+ * @author christian.grobmeier
+ */
+public class BZip2Compressor extends AbstractCompressor {
+	/* Header BZ as byte-Array */
+	private static final byte[] HEADER = new byte[]{(byte)'B', (byte)'Z'};
+	/* Name of this implementation */
+	private static final String NAME = "bz2";
+	/* Default file extension*/
+	private static String DEFAULT_FILE_EXTENSION = "bz2";
+	
+	/**
+	 * Constructor. 
+	 */
+	public BZip2Compressor() {
+		super();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Compressor#compress(java.io.FileInputStream, java.io.FileOutputStream)
+	 */
+	public void compressTo(FileInputStream inputStream, FileOutputStream outputStream) throws CompressException {
+		BZip2OutputStream outputBZStream = null;
+		try {
+			outputBZStream = getPackedOutput( outputStream );
+			CompressUtils.copy( inputStream, outputBZStream );
+		} catch (FileNotFoundException e) {
+			throw new CompressException("File could not be found", e);
+		} catch (IOException e) {
+			throw new CompressException("An IO Exception occured", e);
+		} finally {
+			try {
+				outputBZStream.close();
+			} catch (IOException e1) {
+				throw new CompressException("An IO Exception occured while closing the streams", e1);
+			}
+		}
+	}
+	
+	/* 
+	 * This decompress method uses a special InputStream Class for BZ2
+	 * @see org.apache.commons.compress.Compressor#decompress(java.io.FileInputStream, java.io.FileOutputStream)
+	 */
+	public void decompressTo(FileInputStream input, FileOutputStream outputStream) 
+		throws CompressException {
+		BZip2InputStream inputStream = null;
+		try {
+			inputStream = getPackedInput( input );
+			CompressUtils.copy( inputStream, outputStream );
+		} catch (IOException e) {
+			throw new CompressException("An I/O Exception has occured", e);
+		}
+	}
+	
+	/**
+	 * Skips the 'BZ' header bytes. required by the BZip2InputStream class.
+	 * @param input input stream
+	 * @return {@link BZip2InputStream} instance
+	 * @throws IOException if an IO error occurs
+	 */
+	private BZip2InputStream getPackedInput( final InputStream input )
+		throws IOException {
+		// skips the 'BZ' header bytes required by the BZip2InputStream class
+		final int b1 = input.read();
+		final int b2 = input.read();
+		return new BZip2InputStream( input );
+	}
+	
+	/**
+	 * Writes a 'BZ' header to the output stream, and creates a
+	 * BZip2OutputStream object ready for use, as required by the
+	 * BZip2OutputStream class.
+	 * 
+	 * @param output {@link Output} stream to add a header to
+	 * @return {@link BZip2OutputStream} ready to write to
+	 * @throws IOException if an IO error occurs
+	 */
+	private BZip2OutputStream getPackedOutput( final OutputStream output )
+		throws IOException {
+		output.write( HEADER );
+		return new BZip2OutputStream( output );
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Compressor#getHeader()
+	 */
+	public byte[] getHeader() {
+		return HEADER;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.Compressor#getName()
+	 */
+	public String getName() {
+		return NAME;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.commons.compress.AbstractCompressor#getDefaultFileExtension()
+	 */
+	public String getDefaultFileExtension() {
+		return DEFAULT_FILE_EXTENSION;
+	}
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Compressor.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java?rev=427072&view=auto
==============================================================================
--- jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java (added)
+++ jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java Mon Jul 31 03:55:10 2006
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.compress.compressors.bzip2;
+
+/*
+ * This package is based on the work done by Keiron Liddle, Aftex Software
+ * <keiron@aftexsw.com> to whom the Ant project is very grateful for his
+ * great code.
+ */
+
+/**
+ * Base class for both the compress and decompress classes. Holds common arrays,
+ * and static data.
+ *
+ * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
+ */
+interface BZip2Constants
+{
+    int BASE_BLOCK_SIZE = 100000;
+    int MAX_ALPHA_SIZE = 258;
+    int MAX_CODE_LEN = 23;
+    int RUNA = 0;
+    int RUNB = 1;
+    int N_GROUPS = 6;
+    int G_SIZE = 50;
+    int N_ITERS = 4;
+    int MAX_SELECTORS = ( 2 + ( 900000 / G_SIZE ) );
+    int NUM_OVERSHOOT_BYTES = 20;
+
+    int[] RAND_NUMS = new int[]
+    {
+        619, 720, 127, 481, 931, 816, 813, 233, 566, 247,
+        985, 724, 205, 454, 863, 491, 741, 242, 949, 214,
+        733, 859, 335, 708, 621, 574, 73, 654, 730, 472,
+        419, 436, 278, 496, 867, 210, 399, 680, 480, 51,
+        878, 465, 811, 169, 869, 675, 611, 697, 867, 561,
+        862, 687, 507, 283, 482, 129, 807, 591, 733, 623,
+        150, 238, 59, 379, 684, 877, 625, 169, 643, 105,
+        170, 607, 520, 932, 727, 476, 693, 425, 174, 647,
+        73, 122, 335, 530, 442, 853, 695, 249, 445, 515,
+        909, 545, 703, 919, 874, 474, 882, 500, 594, 612,
+        641, 801, 220, 162, 819, 984, 589, 513, 495, 799,
+        161, 604, 958, 533, 221, 400, 386, 867, 600, 782,
+        382, 596, 414, 171, 516, 375, 682, 485, 911, 276,
+        98, 553, 163, 354, 666, 933, 424, 341, 533, 870,
+        227, 730, 475, 186, 263, 647, 537, 686, 600, 224,
+        469, 68, 770, 919, 190, 373, 294, 822, 808, 206,
+        184, 943, 795, 384, 383, 461, 404, 758, 839, 887,
+        715, 67, 618, 276, 204, 918, 873, 777, 604, 560,
+        951, 160, 578, 722, 79, 804, 96, 409, 713, 940,
+        652, 934, 970, 447, 318, 353, 859, 672, 112, 785,
+        645, 863, 803, 350, 139, 93, 354, 99, 820, 908,
+        609, 772, 154, 274, 580, 184, 79, 626, 630, 742,
+        653, 282, 762, 623, 680, 81, 927, 626, 789, 125,
+        411, 521, 938, 300, 821, 78, 343, 175, 128, 250,
+        170, 774, 972, 275, 999, 639, 495, 78, 352, 126,
+        857, 956, 358, 619, 580, 124, 737, 594, 701, 612,
+        669, 112, 134, 694, 363, 992, 809, 743, 168, 974,
+        944, 375, 748, 52, 600, 747, 642, 182, 862, 81,
+        344, 805, 988, 739, 511, 655, 814, 334, 249, 515,
+        897, 955, 664, 981, 649, 113, 974, 459, 893, 228,
+        433, 837, 553, 268, 926, 240, 102, 654, 459, 51,
+        686, 754, 806, 760, 493, 403, 415, 394, 687, 700,
+        946, 670, 656, 610, 738, 392, 760, 799, 887, 653,
+        978, 321, 576, 617, 626, 502, 894, 679, 243, 440,
+        680, 879, 194, 572, 640, 724, 926, 56, 204, 700,
+        707, 151, 457, 449, 797, 195, 791, 558, 945, 679,
+        297, 59, 87, 824, 713, 663, 412, 693, 342, 606,
+        134, 108, 571, 364, 631, 212, 174, 643, 304, 329,
+        343, 97, 430, 751, 497, 314, 983, 374, 822, 928,
+        140, 206, 73, 263, 980, 736, 876, 478, 430, 305,
+        170, 514, 364, 692, 829, 82, 855, 953, 676, 246,
+        369, 970, 294, 750, 807, 827, 150, 790, 288, 923,
+        804, 378, 215, 828, 592, 281, 565, 555, 710, 82,
+        896, 831, 547, 261, 524, 462, 293, 465, 502, 56,
+        661, 821, 976, 991, 658, 869, 905, 758, 745, 193,
+        768, 550, 608, 933, 378, 286, 215, 979, 792, 961,
+        61, 688, 793, 644, 986, 403, 106, 366, 905, 644,
+        372, 567, 466, 434, 645, 210, 389, 550, 919, 135,
+        780, 773, 635, 389, 707, 100, 626, 958, 165, 504,
+        920, 176, 193, 713, 857, 265, 203, 50, 668, 108,
+        645, 990, 626, 197, 510, 357, 358, 850, 858, 364,
+        936, 638
+    };
+}

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: jakarta/commons/sandbox/compress/trunk/src/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message