commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r675498 [1/6] - in /commons/sandbox/compress/branches/redesign: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/commons/ src/main/java/org/apache/commons/compress/ src/main/java/org/apa...
Date Thu, 10 Jul 2008 10:17:49 GMT
Author: tcurdt
Date: Thu Jul 10 03:17:44 2008
New Revision: 675498

URL: http://svn.apache.org/viewvc?rev=675498&view=rev
Log:
import of new redesign branch

https://issues.apache.org/jira/browse/SANDBOX-247


Added:
    commons/sandbox/compress/branches/redesign/LICENSE.txt   (with props)
    commons/sandbox/compress/branches/redesign/NOTICE.txt   (with props)
    commons/sandbox/compress/branches/redesign/checkstyle.xml   (with props)
    commons/sandbox/compress/branches/redesign/license-header.txt   (with props)
    commons/sandbox/compress/branches/redesign/pom.xml   (with props)
    commons/sandbox/compress/branches/redesign/project.properties   (with props)
    commons/sandbox/compress/branches/redesign/project.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/
    commons/sandbox/compress/branches/redesign/src/main/
    commons/sandbox/compress/branches/redesign/src/main/java/
    commons/sandbox/compress/branches/redesign/src/main/java/org/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarBuffer.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarConstants.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/tar/TarUtils.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/AsiExtraField.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ExtraFieldUtils.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/UnixStat.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/UnrecognizedExtraField.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipExtraField.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipLong.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/zip/ZipShort.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/changes/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/changes/Change.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/changes/ChangeSet.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/changes/ChangeWorker.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/changes/DeleteChange.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/CompressorException.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/CompressorInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/CompressorOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/bzip2/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2Constants.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/bzip2/CRC.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/gzip/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/utils/
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/utils/CompressUtils.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/utils/IOUtils.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/utils/ReflectionUtils.java   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/
    commons/sandbox/compress/branches/redesign/src/main/resources/bla.jar   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/bla.tar   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/bla.tgz   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/bla.zip   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/test1.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/main/resources/test2.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/
    commons/sandbox/compress/branches/redesign/src/site/resources/
    commons/sandbox/compress/branches/redesign/src/site/resources/images/
    commons/sandbox/compress/branches/redesign/src/site/resources/images/compress-logo-white.png   (with props)
    commons/sandbox/compress/branches/redesign/src/site/resources/images/compress-logo-white.xcf   (with props)
    commons/sandbox/compress/branches/redesign/src/site/site.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/
    commons/sandbox/compress/branches/redesign/src/site/xdoc/cvs-usage.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/downloads.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/images/
    commons/sandbox/compress/branches/redesign/src/site/xdoc/images/compress-logo-white.png   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/images/compress-logo-white.xcf   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/index.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/issue-tracking.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/site/xdoc/style/
    commons/sandbox/compress/branches/redesign/src/site/xdoc/style/project.css   (with props)
    commons/sandbox/compress/branches/redesign/src/test/
    commons/sandbox/compress/branches/redesign/src/test/java/
    commons/sandbox/compress/branches/redesign/src/test/java/org/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/CompressTestCase.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/memory/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveEntry.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveInputStream.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/archivers/memory/MemoryArchiveTestCase.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/changes/
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/changes/ChangeSetTestCase.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/java/org/apache/commons/compress/changes/ChangeWorkerTest.java   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.ar
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.jar   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.tar   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.tgz   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.txt.bz2   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.xml.bz2   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/bla.zip   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/test.txt   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/test1.xml   (with props)
    commons/sandbox/compress/branches/redesign/src/test/resources/test2.xml   (with props)

Added: commons/sandbox/compress/branches/redesign/LICENSE.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/LICENSE.txt?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/LICENSE.txt (added)
+++ commons/sandbox/compress/branches/redesign/LICENSE.txt Thu Jul 10 03:17:44 2008
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.

Propchange: commons/sandbox/compress/branches/redesign/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/NOTICE.txt?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/NOTICE.txt (added)
+++ commons/sandbox/compress/branches/redesign/NOTICE.txt Thu Jul 10 03:17:44 2008
@@ -0,0 +1,5 @@
+Apache Commons Compress
+Copyright 2002-2004 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).

Propchange: commons/sandbox/compress/branches/redesign/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/NOTICE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/checkstyle.xml?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/checkstyle.xml (added)
+++ commons/sandbox/compress/branches/redesign/checkstyle.xml Thu Jul 10 03:17:44 2008
@@ -0,0 +1,175 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+  Checkstyle checks configured for Maven.
+-->
+
+<module name="Checker">
+
+    <!-- Checks that a package.html file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <module name="PackageHtml"/>
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <module name="NewlineAtEndOfFile"/>
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+
+    <module name="TreeWalker">
+
+        <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
+        <!-- ************************************************************** -->
+        <!-- Checks that are different from the sun coding conventions ones -->
+        <!-- ************************************************************** -->
+        <module name="Header">
+            <property name="headerFile" value="license-header.txt"/>
+        </module>
+        <property name="tabWidth" value="4"/>
+        <module name="LeftCurly">
+          <property name="option" value="eol"/>
+        </module>
+        <module name="RightCurly">
+          <property name="option" value="alone"/>
+        </module>
+        <module name="LineLength">
+          <property name="max" value="132"/>
+        </module>
+        <module name="MethodLength">
+          <property name="max" value="175"/>
+        </module>
+        <!-- No Paren pad check
+        <module name="ParenPad"/>
+        -->
+        <module name="ConstantName">
+          <property name="format" value="log|^[a-zA-Z][a-zA-Z0-9_]*$"/>
+        </module>
+        
+        <!-- ************************************************************** -->
+        <!-- Default Sun coding conventions checks                          -->
+        <!-- ************************************************************** -->
+
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+        <module name="JavadocMethod"/>
+        <module name="JavadocType"/>
+        <module name="JavadocVariable"/>
+
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+        <module name="MemberName"/>
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <module name="FileLength"/>
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="EmptyForIteratorPad"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap"/>
+        <module name="TabCharacter"/>
+        <module name="WhitespaceAfter"/>
+        <module name="WhitespaceAround"/>
+
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="AvoidNestedBlocks"/>
+        <module name="EmptyBlock"/>
+        
+        <module name="NeedBraces"/>
+
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <module name="AvoidInlineConditionals"/>
+        <module name="DoubleCheckedLocking"/>
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <module name="HiddenField"/>
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <module name="MagicNumber"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="RedundantThrows">
+            <property name="allowUnchecked" value="true"/>   <!-- DISABLED -->
+            <property name="allowSubclasses" value="true"/>   <!-- DISABLED -->
+        </module>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <module name="DesignForExtension">
+            <property name="severity" value="ignore"/>   <!-- DISABLED -->
+        </module>
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="InterfaceIsType"/>
+        <module name="VisibilityModifier"/>
+
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+        <module name="FinalParameters">
+            <property name="severity" value="ignore"/>   <!-- DISABLED -->
+        </module>
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="\s+$"/>
+            <property name="message" value="Line has trailing spaces."/>
+        </module>
+        <module name="TodoComment"/>
+        <module name="UpperEll"/>
+
+    </module>
+
+</module>

Propchange: commons/sandbox/compress/branches/redesign/checkstyle.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/checkstyle.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/checkstyle.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: commons/sandbox/compress/branches/redesign/license-header.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/license-header.txt?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/license-header.txt (added)
+++ commons/sandbox/compress/branches/redesign/license-header.txt Thu Jul 10 03:17:44 2008
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
\ No newline at end of file

Propchange: commons/sandbox/compress/branches/redesign/license-header.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/license-header.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/license-header.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/pom.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/pom.xml?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/pom.xml (added)
+++ commons/sandbox/compress/branches/redesign/pom.xml Thu Jul 10 03:17:44 2008
@@ -0,0 +1,107 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.commons</groupId>
+    <artifactId>commons-sandbox-parent</artifactId>
+    <version>4</version>
+  </parent>
+
+  <artifactId>commons-compress</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>Commons Compress (Sandbox)</name>
+  <url>http://commons.apache.org/sandbox/compress/</url>
+  <description>Commons Compress is a component that contains Tar, Zip and BZip2 packages</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <developers>
+    <developer>
+      <!-- In that I moved them to their new location -->
+      <name>Henri Yandell</name>
+      <id>bayard</id>
+      <email>bayard@apache.org</email>
+      <organization></organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Dirk Verbeeck</name>
+      <id>dirkv</id>
+      <email></email>
+      <organization></organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+  </developers>
+    
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/commons/sandbox/compress/trunk</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/commons/sandbox/compress/trunk</developerConnection>
+    <url>http://svn.apache.org/repos/asf/commons/sandbox/compress/trunk</url>
+  </scm>
+
+  <distributionManagement>
+    <site>
+      <id>website</id>
+      <name>Apache Website</name>
+      <url>scp://people.apache.org/www/commons.apache.org/sandbox/compress/</url>
+    </site>
+  </distributionManagement>
+
+  <properties>
+    <commons.componentid>compress</commons.componentid>
+    <commons.jira.componentid>12311183</commons.jira.componentid>
+  </properties> 
+
+  <build>
+      <sourceDirectory>src/main/java</sourceDirectory>
+      <testSourceDirectory>src/test/test</testSourceDirectory> 
+
+    <!-- turn off cobertura until we figure out why it's hanging -->
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+        <configuration>
+          <instrumentation>
+            <excludes>
+            <exclude>org/apache/commons/compress/bzip2/**/*.class</exclude>
+            <exclude>org/apache/commons/compress/compressors/bzip2/**/*.class</exclude>
+            </excludes>
+          </instrumentation>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>clean</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+      
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <configLocation>checkstyle.xml</configLocation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+</project>

Propchange: commons/sandbox/compress/branches/redesign/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: commons/sandbox/compress/branches/redesign/project.properties
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/project.properties?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/project.properties (added)
+++ commons/sandbox/compress/branches/redesign/project.properties Thu Jul 10 03:17:44 2008
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+maven.repo.remote=http://repo1.maven.org/maven
+
+maven.xdoc.jsl=../commons-build/commons-site.jsl
+maven.xdoc.date=bottom
+maven.xdoc.poweredby.image=maven-feather.png
+maven.xdoc.version=${pom.currentVersion}
+maven.xdoc.developmentProcessUrl=http://commons.apache.org/charter.html
+maven.xdoc.includeProjectDocumentation=yes
+
+maven.checkstyle.properties = checkstyle.xml
+
+# Compile targets
+maven.compile.source=1.4
+maven.compile.target=1.4
+
+# Jar Manifest Additional Attributes
+maven.jar.manifest.attributes.list=Implementation-Vendor-Id,X-Compile-Source-JDK,X-Compile-Target-JDK
+maven.jar.manifest.attribute.Implementation-Vendor-Id=org.apache
+maven.jar.manifest.attribute.X-Compile-Source-JDK=${maven.compile.source}
+maven.jar.manifest.attribute.X-Compile-Target-JDK=${maven.compile.target}
+
+# uncomment the next line to work in offline mode (no jar download & no linkcheck)
+#maven.mode.online=
+maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
+
+maven.javadoc.author=false
+maven.javadoc.links=http://java.sun.com/products/jdk/1.4/docs/api,http://commons.apache.org/dbcp/apidocs
+
+maven.compile.debug=on
+maven.compile.deprecation=off
+maven.compile.optimize=off
+
+maven.jarResources.basedir=src/java
+maven.jar.excludes=**/package.html
+maven.junit.fork=true
+maven.junit.sysproperties=org.xml.sax.driver
+org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
+
+clover.excludes=**/Test*.java

Propchange: commons/sandbox/compress/branches/redesign/project.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/project.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Added: commons/sandbox/compress/branches/redesign/project.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/project.xml?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/project.xml (added)
+++ commons/sandbox/compress/branches/redesign/project.xml Thu Jul 10 03:17:44 2008
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
+-->
+<project>
+  <extend>../commons-build/sandbox-project.xml</extend>
+  <name>Commons Compress</name>
+  <id>commons-compress</id>
+  <logo>/images/compress-logo-white.png</logo>
+  <inceptionYear>2002</inceptionYear>
+  <shortDescription>Commons Compress</shortDescription>
+  <description>
+    Commons Compress is a component that contains Tar, Zip and BZip2 packages.
+  </description>
+  <currentVersion>0.1-dev</currentVersion>
+  <issueTrackingUrl>http://issues.apache.org/bugzilla/</issueTrackingUrl>
+  <siteAddress>cvs.apache.org</siteAddress>
+  <logo></logo>
+  
+  <versions>
+  </versions>
+  <branches>
+  </branches>
+
+  <developers>
+    <developer>
+      <!-- In that I moved them to their new location -->
+      <name>Henri Yandell</name>
+      <id>bayard</id>
+      <email>bayard@apache.org</email>
+      <organization></organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+    <developer>
+      <name>Dirk Verbeeck</name>
+      <id>dirkv</id>
+      <email></email>
+      <organization></organization>
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+  </developers>
+    
+  <dependencies>
+    <dependency>
+      <id>junit</id>
+      <version>3.8.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <unitTest>
+      <includes>
+        <include>**/*Test*</include>
+      </includes>
+    </unitTest>
+  </build>
+</project>

Propchange: commons/sandbox/compress/branches/redesign/project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/project.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/project.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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;
+
+/**
+ * Represents an entry of an archive.
+ */
+public interface ArchiveEntry {
+	/**
+	 * Returns the name of this entry.
+	 * @return the name of this entry
+	 */
+	public String getName();
+	
+	public long getSize();
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveEntry.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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;
+
+/**
+ * Archiver related Exception 
+ */
+public class ArchiveException extends Exception {
+
+	private static final long serialVersionUID = 3256440322136748848L;
+
+	public ArchiveException() {
+		super();
+	}
+
+	public ArchiveException(String message) {
+		super(message);
+	}
+	
+	public ArchiveException(String message, Exception e) {
+		super(message);
+		this.initCause(e);
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public abstract class ArchiveInputStream extends InputStream {
+    /**
+     * Returns the next Archive Entry in this Stream.
+     * @return the next entry
+     * @throws IOException if the next entry could not be read
+     */
+    public abstract ArchiveEntry getNextEntry() throws IOException;
+    
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public abstract class ArchiveOutputStream extends OutputStream {
+
+	public abstract void putArchiveEntry(ArchiveEntry entry) throws IOException;
+	
+    public abstract void closeArchiveEntry() throws IOException;
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.commons.compress.archivers.ar.ArArchiveInputStream;
+import org.apache.commons.compress.archivers.ar.ArArchiveOutputStream;
+import org.apache.commons.compress.archivers.jar.JarArchiveInputStream;
+import org.apache.commons.compress.archivers.jar.JarArchiveOutputStream;
+import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
+import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
+import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
+import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
+import org.apache.commons.compress.utils.ReflectionUtils;
+
+public class ArchiveStreamFactory {
+
+	final Map inputStreamClasses = new HashMap();
+	final Map outputStreamClasses = new HashMap();
+	
+	public ArchiveStreamFactory() throws ArchiveException {
+		registerArchiveInputStream("zip", ZipArchiveInputStream.class);
+		registerArchiveOutputStream("zip", ZipArchiveOutputStream.class);
+
+        registerArchiveInputStream("tar", TarArchiveInputStream.class);
+        registerArchiveOutputStream("tar", TarArchiveOutputStream.class);
+
+        registerArchiveInputStream("ar", ArArchiveInputStream.class);
+        registerArchiveOutputStream("ar", ArArchiveOutputStream.class);
+
+        registerArchiveInputStream("jar", JarArchiveInputStream.class);		
+        registerArchiveOutputStream("jar", JarArchiveOutputStream.class);
+	}
+	
+	
+	public void registerArchiveInputStream( final String name, final Class stream ) throws ArchiveException {
+		if (ArchiveInputStream.class.isAssignableFrom(stream) && !(stream.isInterface())) {
+			inputStreamClasses.put(name, stream);
+        } else {
+            throw new ArchiveException("Archive does not implement the ArchiveInputStream interface.");
+        }	
+	}
+
+	public void registerArchiveOutputStream( final String name, final Class stream ) throws ArchiveException {
+		ReflectionUtils.registerClazz(outputStreamClasses, name, ArchiveOutputStream.class, stream);		
+		if (ArchiveOutputStream.class.isAssignableFrom(stream) && !(stream.isInterface())) {
+			outputStreamClasses.put(name, stream);
+        } else {
+            throw new ArchiveException("Archive does not implement the ArchiveOutputStream interface.");
+        }
+	}
+	
+    public ArchiveInputStream createArchiveInputStream( final String archiverName, final InputStream out ) throws ArchiveException {
+        try {
+            final Class clazz = (Class) inputStreamClasses.get(archiverName);
+
+            if (clazz == null) {
+            	throw new ArchiveException("ArchiverFactory could not create instance");
+            }
+
+            final Class[] params = { InputStream.class };
+            final Constructor constructor = clazz.getConstructor(params);
+            final Object[] initargs = { out };
+            return (ArchiveInputStream) constructor.newInstance(initargs);
+        } catch (InstantiationException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (IllegalAccessException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (SecurityException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (NoSuchMethodException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (IllegalArgumentException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (InvocationTargetException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        }
+    }
+
+    public ArchiveOutputStream createArchiveOutputStream( final String archiverName, final OutputStream out ) throws ArchiveException {
+        try {
+            final Class clazz = (Class) outputStreamClasses.get(archiverName);
+            
+            if (clazz == null) {
+            	throw new ArchiveException("ArchiverFactory could not create instance");
+            }
+            
+            final Class[] params = { OutputStream.class };
+            final Constructor constructor = clazz.getConstructor(params);
+            final Object[] initargs = { out };
+            return (ArchiveOutputStream) constructor.newInstance(initargs);
+        } catch (InstantiationException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (IllegalAccessException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (SecurityException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (NoSuchMethodException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (IllegalArgumentException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        } catch (InvocationTargetException e) {
+            throw new ArchiveException("ArchiverFactory could not create instance", e);
+        }
+    }
+
+    public ArchiveInputStream createArchiveInputStream( final InputStream input ) throws IOException {
+
+		final byte[] signature = new byte[12];
+		input.mark(signature.length);
+		input.read(signature);
+		// reset not supported exception?
+		input.reset();
+
+//		for (int i = 0; i < signature.length; i++) {
+//			System.out.print(Integer.toHexString(signature[i]));
+//			System.out.print(",");
+//		}
+//		System.out.println("");
+		
+		for (Iterator it = inputStreamClasses.values().iterator(); it.hasNext();) {
+			final Class clazz = (Class) it.next();
+			try {
+				final Method method = clazz.getMethod("matches", new Class[] { byte[].class });
+				
+				final Object result = method.invoke(null, new Object[] { signature } );
+				
+				if (result.equals(Boolean.TRUE)) {
+		            final Class[] params = { InputStream.class };
+		            final Constructor constructor = clazz.getConstructor(params);
+		            final Object[] initargs = { input };
+		            return (ArchiveInputStream) constructor.newInstance(initargs);					
+				}
+			} catch (SecurityException e) {
+			} catch (NoSuchMethodException e) {
+			} catch (IllegalArgumentException e) {
+			} catch (IllegalAccessException e) {
+			} catch (InvocationTargetException e) {
+			} catch (InstantiationException e) {
+			}
+		}
+		return null;
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.ar;
+
+import org.apache.commons.compress.archivers.ArchiveEntry;
+
+public class ArArchiveEntry implements ArchiveEntry {
+
+	private final String name;
+	private int userId;
+	private int groupId;
+	private int mode;
+	private long lastModified;
+	private long length;
+
+	public ArArchiveEntry(String name, long length) {
+		this(name, length, 0, 0, 33188, System.currentTimeMillis());
+	}
+	
+	public ArArchiveEntry(String name, long length, int userId, int groupId, int mode, long lastModified) {
+		this.name = name;
+		this.length = length;
+		this.userId = userId;
+		this.groupId = groupId;
+		this.mode = mode;
+		this.lastModified = lastModified;
+	}
+
+	public long getSize() {
+		return this.getLength();
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public int getUserId() {
+		return userId;
+	}
+	
+	public int getGroupId() {
+		return groupId;
+	}
+	
+	public int getMode() {
+		return mode;
+	}
+	
+	public long getLastModified() {
+		return lastModified;
+	}
+	
+	public long getLength() {
+		return length;
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveEntry.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.ar;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.ArchiveInputStream;
+
+public class ArArchiveInputStream extends ArchiveInputStream {
+
+	private final InputStream input;
+	private long offset = 0;
+	
+	public ArArchiveInputStream( final InputStream pInput ) {
+		input = pInput;
+	}
+	
+	public ArchiveEntry getNextEntry() throws IOException {
+		
+		if (offset == 0) {
+			final byte[] expected = "!<arch>\n".getBytes();			
+			final byte[] realized = new byte[expected.length]; 
+			final int read = input.read(realized);
+			if (read != expected.length) {
+				throw new IOException("failed to read header");
+			}
+			for (int i = 0; i < expected.length; i++) {
+				if (expected[i] != realized[i]) {
+					throw new IOException("invalid header " + new String(realized));
+				}
+			}
+		}
+
+		if (input.available() == 0) {
+			return null;
+		}
+				
+		if (offset % 2 != 0) {
+			read();
+		}
+
+		final byte[] name = new byte[16];
+		final byte[] lastmodified = new byte[12];
+		final byte[] userid = new byte[6];
+		final byte[] groupid = new byte[6];
+		final byte[] filemode = new byte[8];
+		final byte[] length = new byte[10];
+		
+		read(name);
+		read(lastmodified);
+		read(userid);
+		read(groupid);
+		read(filemode);
+		read(length);
+
+		{
+			final byte[] expected = "`\012".getBytes();			
+			final byte[] realized = new byte[expected.length]; 
+			final int read = input.read(realized);
+			if (read != expected.length) {
+				throw new IOException("failed to read entry header");
+			}
+			for (int i = 0; i < expected.length; i++) {
+				if (expected[i] != realized[i]) {
+					throw new IOException("invalid entry header. not read the content?");
+				}
+			}
+		}
+		
+		return new ArArchiveEntry(new String(name).trim(), Long.parseLong(new String(length).trim()));
+	
+	}
+	
+	
+	public int read() throws IOException {
+		final int ret = input.read();
+		offset++;
+		return ret;
+	}
+
+	public int read(byte[] b, int off, int len) throws IOException {
+		return this.input.read(b, off, len);
+	}
+	
+	public static boolean matches( byte[] signature ) {
+		// 3c21 7261 6863 0a3e
+    	
+    	if (signature[0] != 0x21) {
+    		return false;
+    	}
+    	if (signature[1] != 0x3c) {
+    		return false;
+    	}
+    	if (signature[2] != 0x61) {
+    		return false;
+    	}
+    	if (signature[3] != 0x72) {
+    		return false;
+    	}
+    	if (signature[4] != 0x63) {
+    		return false;
+    	}
+    	if (signature[5] != 0x68) {
+    		return false;
+    	}
+    	if (signature[6] != 0x3e) {
+    		return false;
+    	}
+    	if (signature[7] != 0x0a) {
+    		return false;
+    	}
+    	
+    	return true;
+	}
+
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,174 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.ar;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.ArchiveOutputStream;
+
+public class ArArchiveOutputStream extends ArchiveOutputStream {
+
+	private final OutputStream out;
+	private long archiveOffset = 0;
+	private long entryOffset = 0;
+	private ArArchiveEntry prevEntry;
+
+	public ArArchiveOutputStream( final OutputStream pOut ) {
+		out = pOut;
+		
+	}
+
+	private long writeArchiveHeader() throws IOException {		
+		final String header = "!<arch>\n";
+		out.write(header.getBytes());
+		return header.length();
+	}
+
+	public void closeArchiveEntry() throws IOException {
+		if ((entryOffset % 2) != 0) {
+        	write('\n');
+        	archiveOffset++;
+        }		
+	}
+	
+	public void putArchiveEntry( final ArchiveEntry pEntry ) throws IOException {
+		ArArchiveEntry pArEntry = (ArArchiveEntry)pEntry;
+		if (prevEntry == null) {
+			archiveOffset += writeArchiveHeader();			
+		} else {
+			if (prevEntry.getLength() != entryOffset) {
+				throw new IOException("length does not match entry (" + prevEntry.getLength() + " != " + entryOffset);
+			}
+			
+			closeArchiveEntry();
+		}
+		
+		prevEntry = pArEntry;
+		
+		archiveOffset += writeEntryHeader(pArEntry);
+
+		entryOffset = 0;
+	}
+
+	private long fill( final long pOffset, final long pNewOffset, final char pFill ) throws IOException { 
+		final long diff = pNewOffset - pOffset;
+	
+		if (diff > 0) {
+			for (int i = 0; i < diff; i++) {
+				write(pFill);
+			}
+		}
+
+		return pNewOffset;
+	}
+	
+	private long write( final String data ) throws IOException {
+		final byte[] bytes = data.getBytes("ascii");
+		write(bytes);
+		return bytes.length;
+	}
+	
+	private long writeEntryHeader( final ArArchiveEntry pEntry ) throws IOException {
+		
+		long offset = 0;
+		
+		final String n = pEntry.getName();
+		if (n.length() > 16) {
+			throw new IOException("filename too long");
+		}		
+		offset += write(n);
+		
+		offset = fill(offset, 16, ' ');
+		final String m = "" + (pEntry.getLastModified() / 1000);
+		if (m.length() > 12) {
+			throw new IOException("modified too long");
+		}		
+		offset += write(m);		
+
+		offset = fill(offset, 28, ' ');
+		final String u = "" + pEntry.getUserId();
+		if (u.length() > 6) {
+			throw new IOException("userid too long");
+		}		
+		offset += write(u);
+
+		offset = fill(offset, 34, ' ');
+		final String g = "" + pEntry.getGroupId();
+		if (g.length() > 6) {
+			throw new IOException("groupid too long");
+		}		
+		offset += write(g);
+
+		offset = fill(offset, 40, ' ');
+		final String fm = "" + Integer.toString(pEntry.getMode(), 8);
+		if (fm.length() > 8) {
+			throw new IOException("filemode too long");
+		}		
+		offset += write(fm);
+
+		offset = fill(offset, 48, ' ');
+		final String s = "" + pEntry.getLength();
+		if (s.length() > 10) {
+			throw new IOException("size too long");
+		}		
+		offset += write(s);
+
+		offset = fill(offset, 58, ' ');
+
+		offset += write("`\012");
+		
+		return offset;
+	}		
+	
+	public void write(int b) throws IOException {
+		out.write(b);
+		entryOffset++;
+	}
+
+	public void write(byte[] b, int off, int len) throws IOException {
+		out.write(b, off, len);
+		entryOffset += len;
+	}
+
+	public void write(byte[] b) throws IOException {
+		out.write(b);
+		entryOffset += b.length;
+	}
+
+	public void close() throws IOException {
+		closeArchiveEntry();
+		out.close();
+		prevEntry = null;
+	}
+
+	public String getDefaultFileExtension() {
+		return "ar";
+	}
+
+	public byte[] getHeader() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	public String getName() {
+		return "ar";
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveOutputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.jar;
+
+import java.security.cert.Certificate;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
+
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
+
+public class JarArchiveEntry extends ZipArchiveEntry implements ArchiveEntry {
+
+	private Attributes manifestAttributes = null;
+	private Certificate[] certificates = null; 
+	
+	public JarArchiveEntry(ZipEntry entry) throws ZipException {
+		super(entry);
+	}
+
+	public JarArchiveEntry(String name) {
+		super(name);
+	}
+
+	public JarArchiveEntry(ZipArchiveEntry entry) throws ZipException {
+		super(entry);
+	}
+
+	public JarArchiveEntry(JarEntry entry) throws ZipException {
+		super(entry);
+		
+	}
+
+	public Attributes getManifestAttributes() {
+		return manifestAttributes;
+	}
+
+	public Certificate[] getCertificates() {
+		return certificates;
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveEntry.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java?rev=675498&view=auto
==============================================================================
--- commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java (added)
+++ commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java Thu Jul 10 03:17:44 2008
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.jar;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.compress.archivers.ArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
+
+public class JarArchiveInputStream extends ZipArchiveInputStream {
+
+	public JarArchiveInputStream( final InputStream inputStream ) throws IOException {
+		super(inputStream);
+	}
+	
+	public ArchiveEntry getNextEntry() throws IOException {
+		return (ArchiveEntry)new JarArchiveEntry((ZipArchiveEntry)super.getNextEntry());
+	}
+	
+	public static boolean matches( byte[] signature ) {
+		// 4b50 0403 0014 0008
+
+    	if (signature[0] != 0x50) {
+    		return false;
+    	}
+    	if (signature[1] != 0x4b) {
+    		return false;
+    	}
+    	if (signature[2] != 0x03) {
+    		return false;
+    	}
+    	if (signature[3] != 0x04) {
+    		return false;
+    	}
+    	if (signature[4] != 0x14) {
+    		return false;
+    	}
+    	if (signature[5] != 0x00) {
+    		return false;
+    	}
+    	if (signature[6] != 0x08) {
+    		return false;
+    	}
+    	if (signature[7] != 0x00) {
+    		return false;
+    	}
+    	
+    	return true;
+	}
+}

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/compress/branches/redesign/src/main/java/org/apache/commons/compress/archivers/jar/JarArchiveInputStream.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message