harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r446478 [1/11] - in /incubator/harmony/enhanced/classlib/trunk/modules/archive: ./ .settings/ META-INF/ make/ src/main/java/java/util/jar/ src/main/java/java/util/zip/ src/main/java/org/apache/harmony/archive/internal/pack200/ src/main/nati...
Date Fri, 15 Sep 2006 02:40:36 GMT
Author: ndbeyer
Date: Thu Sep 14 19:40:33 2006
New Revision: 446478

URL: http://svn.apache.org/viewvc?view=rev&rev=446478
Log:
Set eol-style = native for archive module.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/.project   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/make/patternset.txt   (props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Adler32.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/CRC32.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/CheckedInputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/CheckedOutputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Checksum.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/DataFormatException.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Deflater.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/DeflaterOutputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/GZIPInputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/GZIPOutputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/Inflater.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipConstants.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipEntry.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipException.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipInputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipOutputStream.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/pack200/BHSDCodec.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/pack200/CodecEncoding.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/pack200/PopulationCodec.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/pack200/RunCodec.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/linux/DoxygenSupport.txt   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/adler32.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/archive_copyright.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/archiveglob.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/deflater.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/inflater.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/inflater.h   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/jarfile.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/jclcrc32.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/jclglob.h   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/shared/zip.h   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/archive/windows/DoxygenSupport.txt   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/include/shared/zipsup.h   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/linux/DoxygenSupport.txt   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_ca.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_cs.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_de.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_es.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_fr.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_hu.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_it.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_ja.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_ko.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_pl.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_pt_BR.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_ru.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_sk.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_sl.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_tr.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_zh.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_zh_CN.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzip_zh_TW.nls   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/hyzipnls.h   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/zcpool.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/zipalloc.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/zipcache.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/shared/zipsup.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zip/windows/DoxygenSupport.txt   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/native/zlib/shared/zlib_copyright.c   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/internal/pack200/AllTests.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/internal/pack200/CodecEncodingTest.java   (contents, props changed)
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/internal/pack200/PopulationCodecTest.java   (contents, props changed)

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath Thu Sep 14 19:40:33 2006
@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry output="bin/main" kind="src" path="src/main/java"/>
-	<classpathentry output="bin/main" kind="src" path="src/main/resources"/>
-	<classpathentry output="bin/test" kind="src" path="src/test/java"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
-	<classpathentry kind="output" path="bin/main"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry output="bin/main" kind="src" path="src/main/java"/>
+	<classpathentry output="bin/main" kind="src" path="src/main/resources"/>
+	<classpathentry output="bin/test" kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
+	<classpathentry kind="output" path="bin/main"/>
+</classpath>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/.classpath
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/.project
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/.project?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/.project (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/.project Thu Sep 14 19:40:33 2006
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>archive</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>archive</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/.project
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs Thu Sep 14 19:40:33 2006
@@ -1,12 +1,12 @@
-#Wed May 03 13:10:22 BST 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Wed May 03 13:10:22 BST 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.core.prefs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs Thu Sep 14 19:40:33 2006
@@ -1,3 +1,3 @@
-#Wed May 03 13:10:00 BST 2006
-eclipse.preferences.version=1
-internal.default.compliance=user
+#Wed May 03 13:10:00 BST 2006
+eclipse.preferences.version=1
+internal.default.compliance=user

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.jdt.ui.prefs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs Thu Sep 14 19:40:33 2006
@@ -1,3 +1,3 @@
-#Thu Dec 15 00:50:33 GMT 2005
-eclipse.preferences.version=1
-pluginProject.extensions=false
+#Thu Dec 15 00:50:33 GMT 2005
+eclipse.preferences.version=1
+pluginProject.extensions=false

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/.settings/org.eclipse.pde.core.prefs
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF Thu Sep 14 19:40:33 2006
@@ -1,26 +1,26 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Harmony Archive
-Bundle-SymbolicName: org.apache.harmony.archive
-Bundle-Version: 1.0.0
-Bundle-ClassPath: .
-Eclipse-JREBundle: true
-Import-Package: java.beans,
- java.io,
- java.lang,
- java.lang.ref,
- java.lang.reflect,
- java.net,
- java.nio,
- java.nio.charset,
- java.security,
- java.security.cert,
- java.util,
- javax.security.auth.x500,
- org.apache.harmony.luni.util,
- org.apache.harmony.security.utils,
- org.apache.harmony.kernel.vm,
- tests.support;hy_usage=test;resolution:=optional,
- tests.support.resource;hy_usage=test;resolution:=optional
-Export-Package: java.util.jar,
- java.util.zip
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Harmony Archive
+Bundle-SymbolicName: org.apache.harmony.archive
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Eclipse-JREBundle: true
+Import-Package: java.beans,
+ java.io,
+ java.lang,
+ java.lang.ref,
+ java.lang.reflect,
+ java.net,
+ java.nio,
+ java.nio.charset,
+ java.security,
+ java.security.cert,
+ java.util,
+ javax.security.auth.x500,
+ org.apache.harmony.luni.util,
+ org.apache.harmony.security.utils,
+ org.apache.harmony.kernel.vm,
+ tests.support;hy_usage=test;resolution:=optional,
+ tests.support.resource;hy_usage=test;resolution:=optional
+Export-Package: java.util.jar,
+ java.util.zip

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml Thu Sep 14 19:40:33 2006
@@ -1,47 +1,47 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
-  
-    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.
--->
-
-<hy>
-   <archive location=".">
-      <src>
-         <main>
-            <java location="src/main/java" />
-            <native location="src/main/native" />
-            <resources location="src/main/resources" />
-         </main>
-         <test>
-            <java location="src/test/java" />
-            <resources location="src/test/resources" />
-         </test>
-         <natives location="src/natives" />
-      </src>
-      <bin>
-        <main location="bin/main" />
-        <test location="bin/test" />
-      </bin>
-      <packaging>
-      </packaging>
-   </archive>
-
-   <hdk location="../../deploy" />
-   <jdk location="../../deploy/jdk" />
-   <build location="../../build/classes" />
-
-   <tests>
-      <reports location="../../build/test_report" />
-   </tests>
-</hy>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    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.
+-->
+
+<hy>
+   <archive location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+            <native location="src/main/native" />
+            <resources location="src/main/resources" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/test/resources" />
+         </test>
+         <natives location="src/natives" />
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+      </packaging>
+   </archive>
+
+   <hdk location="../../deploy" />
+   <jdk location="../../deploy/jdk" />
+   <build location="../../build/classes" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/hyproperties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/make/patternset.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java Thu Sep 14 19:40:33 2006
@@ -1,352 +1,352 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
- * 
- * 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 java.util.jar;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * The Attributes class is used to store values for Manifest entries. Attributes
- * keys are generally instances of Attributes.Name. Values associated with
- * Attributes keys are of type String.
- */
-public class Attributes implements Cloneable, Map<Object, Object> {
-
-    protected Map<Object, Object> map;
-
-    public static class Name {
-        private String name;
-
-        private int hashCode;
-
-        public static final Name CLASS_PATH = new Name("Class-Path", false);
-
-        public static final Name MANIFEST_VERSION = new Name(
-                "Manifest-Version", false);
-
-        public static final Name MAIN_CLASS = new Name("Main-Class", false);
-
-        public static final Name SIGNATURE_VERSION = new Name(
-                "Signature-Version", false);
-
-        public static final Name CONTENT_TYPE = new Name("Content-Type", false);
-
-        public static final Name SEALED = new Name("Sealed", false);
-
-        public static final Name IMPLEMENTATION_TITLE = new Name(
-                "Implementation-Title", false);
-
-        public static final Name IMPLEMENTATION_VERSION = new Name(
-                "Implementation-Version", false);
-
-        public static final Name IMPLEMENTATION_VENDOR = new Name(
-                "Implementation-Vendor", false);
-
-        public static final Name SPECIFICATION_TITLE = new Name(
-                "Specification-Title", false);
-
-        public static final Name SPECIFICATION_VERSION = new Name(
-                "Specification-Version", false);
-
-        public static final Name SPECIFICATION_VENDOR = new Name(
-                "Specification-Vendor", false);
-
-        public static final Name EXTENSION_LIST = new Name("Extension-List",
-                false);
-
-        public static final Name EXTENSION_NAME = new Name("Extension-Name",
-                false);
-
-        public static final Name EXTENSION_INSTALLATION = new Name(
-                "Extension-Installation", false);
-
-        public static final Name IMPLEMENTATION_VENDOR_ID = new Name(
-                "Implementation-Vendor-Id", false);
-
-        public static final Name IMPLEMENTATION_URL = new Name(
-                "Implementation-URL", false);
-
-        public Name(String s) {
-            int i = s.length();
-            if (i == 0 || i > 70) {
-                throw new IllegalArgumentException();
-            }
-            for (; --i >= 0;) {
-                char ch = s.charAt(i);
-                if (!((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')
-                        || ch == '_' || ch == '-' || (ch >= '0' && ch <= '9'))) {
-                    throw new IllegalArgumentException(s);
-                }
-            }
-            name = s;
-        }
-
-        Name(String s, boolean ignored) {
-            name = s;
-        }
-
-        public String toString() {
-            return name;
-        }
-
-        public boolean equals(Object an) {
-            if (an == null) {
-                return false;
-            }
-            return an.getClass() == this.getClass()
-                    && name.equalsIgnoreCase(((Name) an).name);
-        }
-
-        public int hashCode() {
-            if (hashCode == 0) {
-                hashCode = name.toLowerCase().hashCode();
-            }
-            return hashCode;
-        }
-    }
-
-    /**
-     * Constructs an Attributes instance
-     */
-    public Attributes() {
-        map = new HashMap<Object, Object>();
-    }
-
-    /**
-     * Constructs an Attributes instance obtaining keys and values from the
-     * parameter Attributes, attrib
-     * 
-     * @param attrib
-     *            The Attributes to obtain entries from.
-     */
-    public Attributes(Attributes attrib) {
-        map = (Map<Object, Object>) ((HashMap) attrib.map).clone();
-    }
-
-    /**
-     * Constructs an Attributes instance with initial capacity of size size
-     * 
-     * @param size
-     *            Initial size of this Attributes instance.
-     */
-    public Attributes(int size) {
-        map = new HashMap<Object, Object>(size);
-    }
-
-    /**
-     * Removes all key/value pairs from this Attributes.
-     * 
-     */
-    public void clear() {
-        map.clear();
-    }
-
-    /**
-     * Determines whether this Attributes contains the specified key
-     * 
-     * 
-     * @param key
-     *            The key to search for.
-     * @return true if the key is found, false otherwise
-     */
-    public boolean containsKey(Object key) {
-        return map.containsKey(key);
-    }
-
-    /**
-     * Determines whether this Attributes contains the specified value
-     * 
-     * @param value
-     *            The value to search for.
-     * @return true if the value is found, false otherwise
-     */
-    public boolean containsValue(Object value) {
-        return map.containsValue(value);
-    }
-
-    /**
-     * Returns a set containing MapEntry's for each of the key/value pairs
-     * contained in this Attributes.
-     * 
-     * @return a set of MapEntry's
-     */
-    public Set<Map.Entry<Object, Object>> entrySet() {
-        return map.entrySet();
-    }
-
-    /**
-     * Returns the value associated with the parameter key
-     * 
-     * @param key
-     *            The key to search for.
-     * @return Object associated with key, or null if key does not exist.
-     */
-    public Object get(Object key) {
-        return map.get(key);
-    }
-
-    /**
-     * Determines whether this Attributes contains any keys
-     * 
-     * @return true if one or more keys exist, false otherwise
-     */
-    public boolean isEmpty() {
-        return map.isEmpty();
-    }
-
-    /**
-     * Returns a Set containing all the keys found in this Attributes.
-     * 
-     * @return a Set of all keys
-     */
-    public Set<Object> keySet() {
-        return map.keySet();
-    }
-
-    /**
-     * Store value in this Attributes and associate it with key.
-     * 
-     * @param key
-     *            The key to associate with value.
-     * @param value
-     *            The value to store in this Attributes
-     * @return The value being stored
-     * 
-     * @exception ClassCastException
-     *                when key is not an Attributes.Name or value is not a
-     *                String
-     */
-    public Object put(Object key, Object value) {
-        return map.put((Name)key, (String)value);
-    }
-
-    /**
-     * Store all the key.value pairs in the argument in this Attributes.
-     * 
-     * @param attrib
-     *            the associations to store (must be of type Attributes).
-     */
-    public void putAll(Map<?, ?> attrib) {
-        if (attrib == null) {
-            throw new ClassCastException();
-        }
-        this.map.putAll((Attributes)attrib);
-    }
-
-    /**
-     * Deletes the key/value pair with key key from this Attributes.
-     * 
-     * @param key
-     *            The key to remove
-     * @return the values associated with the removed key, null if not present.
-     */
-    public Object remove(Object key) {
-        return map.remove(key);
-    }
-
-    /**
-     * Returns the number of key.value pairs associated with this Attributes.
-     * 
-     * @return the size of this Attributes
-     */
-    public int size() {
-        return map.size();
-    }
-
-    /**
-     * Returns a Collection of all the values present in this Attributes.
-     * 
-     * @return a Collection of all values present
-     */
-    public Collection<Object> values() {
-        return map.values();
-    }
-
-    public Object clone() {
-        Attributes clone;
-        try {
-            clone = (Attributes) super.clone();
-        } catch (CloneNotSupportedException e) {
-            return null;
-        }
-        clone.map = (Map<Object, Object>) ((HashMap) this.map).clone();
-        return clone;
-    }
-
-    /**
-     * Returns the hashCode of this Attributes
-     * 
-     * @return the hashCode of this Object.
-     */
-    public int hashCode() {
-        return map.hashCode();
-    }
-
-    /**
-     * Determines if this Attributes and the parameter Attributes are equal. Two
-     * Attributes instances are equal if they contain the same keys and values.
-     * 
-     * @return true if the Attributes are equals, false otherwise
-     */
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj instanceof Attributes) {
-            return map.equals(((Attributes) obj).map);
-        }
-        return false;
-    }
-
-    /**
-     * Returns the value associated with the parameter Attributes.Name key.
-     * 
-     * @param name
-     *            The key to obtain the value for.
-     * @return the String associated with name, or null if name is not a valid
-     *         key
-     */
-    public String getValue(Attributes.Name name) {
-        return (String) map.get(name);
-    }
-
-    /**
-     * Returns the String associated with the parameter name.
-     * 
-     * @param name
-     *            The key to obtain the value for.
-     * @return the String associated with name, or null if name is not a valid
-     *         key
-     */
-    public String getValue(String name) {
-        return (String) map.get(new Attributes.Name(name));
-    }
-
-    /**
-     * Stores value val against key name in this Attributes
-     * 
-     * @param name
-     *            The key to store against.
-     * @param val
-     *            The value to store in this Attributes
-     * @return the Value being stored
-     */
-    public String putValue(String name, String val) {
-        return (String) map.put(new Attributes.Name(name), val);
-    }
-}
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * 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 java.util.jar;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The Attributes class is used to store values for Manifest entries. Attributes
+ * keys are generally instances of Attributes.Name. Values associated with
+ * Attributes keys are of type String.
+ */
+public class Attributes implements Cloneable, Map<Object, Object> {
+
+    protected Map<Object, Object> map;
+
+    public static class Name {
+        private String name;
+
+        private int hashCode;
+
+        public static final Name CLASS_PATH = new Name("Class-Path", false);
+
+        public static final Name MANIFEST_VERSION = new Name(
+                "Manifest-Version", false);
+
+        public static final Name MAIN_CLASS = new Name("Main-Class", false);
+
+        public static final Name SIGNATURE_VERSION = new Name(
+                "Signature-Version", false);
+
+        public static final Name CONTENT_TYPE = new Name("Content-Type", false);
+
+        public static final Name SEALED = new Name("Sealed", false);
+
+        public static final Name IMPLEMENTATION_TITLE = new Name(
+                "Implementation-Title", false);
+
+        public static final Name IMPLEMENTATION_VERSION = new Name(
+                "Implementation-Version", false);
+
+        public static final Name IMPLEMENTATION_VENDOR = new Name(
+                "Implementation-Vendor", false);
+
+        public static final Name SPECIFICATION_TITLE = new Name(
+                "Specification-Title", false);
+
+        public static final Name SPECIFICATION_VERSION = new Name(
+                "Specification-Version", false);
+
+        public static final Name SPECIFICATION_VENDOR = new Name(
+                "Specification-Vendor", false);
+
+        public static final Name EXTENSION_LIST = new Name("Extension-List",
+                false);
+
+        public static final Name EXTENSION_NAME = new Name("Extension-Name",
+                false);
+
+        public static final Name EXTENSION_INSTALLATION = new Name(
+                "Extension-Installation", false);
+
+        public static final Name IMPLEMENTATION_VENDOR_ID = new Name(
+                "Implementation-Vendor-Id", false);
+
+        public static final Name IMPLEMENTATION_URL = new Name(
+                "Implementation-URL", false);
+
+        public Name(String s) {
+            int i = s.length();
+            if (i == 0 || i > 70) {
+                throw new IllegalArgumentException();
+            }
+            for (; --i >= 0;) {
+                char ch = s.charAt(i);
+                if (!((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')
+                        || ch == '_' || ch == '-' || (ch >= '0' && ch <= '9'))) {
+                    throw new IllegalArgumentException(s);
+                }
+            }
+            name = s;
+        }
+
+        Name(String s, boolean ignored) {
+            name = s;
+        }
+
+        public String toString() {
+            return name;
+        }
+
+        public boolean equals(Object an) {
+            if (an == null) {
+                return false;
+            }
+            return an.getClass() == this.getClass()
+                    && name.equalsIgnoreCase(((Name) an).name);
+        }
+
+        public int hashCode() {
+            if (hashCode == 0) {
+                hashCode = name.toLowerCase().hashCode();
+            }
+            return hashCode;
+        }
+    }
+
+    /**
+     * Constructs an Attributes instance
+     */
+    public Attributes() {
+        map = new HashMap<Object, Object>();
+    }
+
+    /**
+     * Constructs an Attributes instance obtaining keys and values from the
+     * parameter Attributes, attrib
+     * 
+     * @param attrib
+     *            The Attributes to obtain entries from.
+     */
+    public Attributes(Attributes attrib) {
+        map = (Map<Object, Object>) ((HashMap) attrib.map).clone();
+    }
+
+    /**
+     * Constructs an Attributes instance with initial capacity of size size
+     * 
+     * @param size
+     *            Initial size of this Attributes instance.
+     */
+    public Attributes(int size) {
+        map = new HashMap<Object, Object>(size);
+    }
+
+    /**
+     * Removes all key/value pairs from this Attributes.
+     * 
+     */
+    public void clear() {
+        map.clear();
+    }
+
+    /**
+     * Determines whether this Attributes contains the specified key
+     * 
+     * 
+     * @param key
+     *            The key to search for.
+     * @return true if the key is found, false otherwise
+     */
+    public boolean containsKey(Object key) {
+        return map.containsKey(key);
+    }
+
+    /**
+     * Determines whether this Attributes contains the specified value
+     * 
+     * @param value
+     *            The value to search for.
+     * @return true if the value is found, false otherwise
+     */
+    public boolean containsValue(Object value) {
+        return map.containsValue(value);
+    }
+
+    /**
+     * Returns a set containing MapEntry's for each of the key/value pairs
+     * contained in this Attributes.
+     * 
+     * @return a set of MapEntry's
+     */
+    public Set<Map.Entry<Object, Object>> entrySet() {
+        return map.entrySet();
+    }
+
+    /**
+     * Returns the value associated with the parameter key
+     * 
+     * @param key
+     *            The key to search for.
+     * @return Object associated with key, or null if key does not exist.
+     */
+    public Object get(Object key) {
+        return map.get(key);
+    }
+
+    /**
+     * Determines whether this Attributes contains any keys
+     * 
+     * @return true if one or more keys exist, false otherwise
+     */
+    public boolean isEmpty() {
+        return map.isEmpty();
+    }
+
+    /**
+     * Returns a Set containing all the keys found in this Attributes.
+     * 
+     * @return a Set of all keys
+     */
+    public Set<Object> keySet() {
+        return map.keySet();
+    }
+
+    /**
+     * Store value in this Attributes and associate it with key.
+     * 
+     * @param key
+     *            The key to associate with value.
+     * @param value
+     *            The value to store in this Attributes
+     * @return The value being stored
+     * 
+     * @exception ClassCastException
+     *                when key is not an Attributes.Name or value is not a
+     *                String
+     */
+    public Object put(Object key, Object value) {
+        return map.put((Name)key, (String)value);
+    }
+
+    /**
+     * Store all the key.value pairs in the argument in this Attributes.
+     * 
+     * @param attrib
+     *            the associations to store (must be of type Attributes).
+     */
+    public void putAll(Map<?, ?> attrib) {
+        if (attrib == null) {
+            throw new ClassCastException();
+        }
+        this.map.putAll((Attributes)attrib);
+    }
+
+    /**
+     * Deletes the key/value pair with key key from this Attributes.
+     * 
+     * @param key
+     *            The key to remove
+     * @return the values associated with the removed key, null if not present.
+     */
+    public Object remove(Object key) {
+        return map.remove(key);
+    }
+
+    /**
+     * Returns the number of key.value pairs associated with this Attributes.
+     * 
+     * @return the size of this Attributes
+     */
+    public int size() {
+        return map.size();
+    }
+
+    /**
+     * Returns a Collection of all the values present in this Attributes.
+     * 
+     * @return a Collection of all values present
+     */
+    public Collection<Object> values() {
+        return map.values();
+    }
+
+    public Object clone() {
+        Attributes clone;
+        try {
+            clone = (Attributes) super.clone();
+        } catch (CloneNotSupportedException e) {
+            return null;
+        }
+        clone.map = (Map<Object, Object>) ((HashMap) this.map).clone();
+        return clone;
+    }
+
+    /**
+     * Returns the hashCode of this Attributes
+     * 
+     * @return the hashCode of this Object.
+     */
+    public int hashCode() {
+        return map.hashCode();
+    }
+
+    /**
+     * Determines if this Attributes and the parameter Attributes are equal. Two
+     * Attributes instances are equal if they contain the same keys and values.
+     * 
+     * @return true if the Attributes are equals, false otherwise
+     */
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof Attributes) {
+            return map.equals(((Attributes) obj).map);
+        }
+        return false;
+    }
+
+    /**
+     * Returns the value associated with the parameter Attributes.Name key.
+     * 
+     * @param name
+     *            The key to obtain the value for.
+     * @return the String associated with name, or null if name is not a valid
+     *         key
+     */
+    public String getValue(Attributes.Name name) {
+        return (String) map.get(name);
+    }
+
+    /**
+     * Returns the String associated with the parameter name.
+     * 
+     * @param name
+     *            The key to obtain the value for.
+     * @return the String associated with name, or null if name is not a valid
+     *         key
+     */
+    public String getValue(String name) {
+        return (String) map.get(new Attributes.Name(name));
+    }
+
+    /**
+     * Stores value val against key name in this Attributes
+     * 
+     * @param name
+     *            The key to store against.
+     * @param val
+     *            The value to store in this Attributes
+     * @return the Value being stored
+     */
+    public String putValue(String name, String val) {
+        return (String) map.put(new Attributes.Name(name), val);
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java Thu Sep 14 19:40:33 2006
@@ -1,295 +1,295 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
- * 
- * 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 java.util.jar;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UTFDataFormatException;
-import java.security.AccessController;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.harmony.luni.util.Msg;
-import org.apache.harmony.luni.util.PriviAction;
-import org.apache.harmony.luni.util.Util;
-
-class InitManifest {
-    private byte[] inbuf = new byte[1024];
-
-    private int inbufCount = 0, inbufPos = 0;
-
-    private byte[] buffer = new byte[5];
-
-    private char[] charbuf = new char[0];
-
-    private ByteArrayOutputStream out = new ByteArrayOutputStream(256);
-
-    private String encoding;
-
-    private boolean usingUTF8 = true;
-
-    private Map<String, Attributes.Name> attributeNames = new HashMap<String, Attributes.Name>();
-
-    private byte[] mainAttributesChunk;
-
-    InitManifest(InputStream is, Attributes main, Map<String, Attributes> entries, Map<String, byte[]> chunks,
-            String verString) throws IOException {
-        encoding = AccessController.doPrivileged(new PriviAction<String>(
-                "manifest.read.encoding"));
-        if ("".equals(encoding)) {
-            encoding = null;
-        }
-
-        Attributes current = main;
-        ArrayList<String> list = new ArrayList<String>();
-
-        // Return the chunk of main attributes in the manifest.
-        mainAttributesChunk = nextChunk(is, list);
-
-        Iterator<String> it = list.iterator();
-        while (it.hasNext()) {
-            addAttribute(it.next(), current);
-        }
-
-        // Check for version attribute
-        if (verString != null && main.getValue(verString) == null) {
-            throw new IOException(Msg.getString("K0009", verString));
-        }
-
-        list.clear();
-        byte[] chunk = null;
-        while (chunks == null ? readLines(is, list) : (chunk = nextChunk(is,
-                list)) != null) {
-            it = list.iterator();
-            String line = it.next();
-            if (line.length() < 7
-                    || !line.substring(0, 5).toLowerCase().equals("name:")) {
-                throw new IOException(Msg.getString("K000a"));
-            }
-            // Name: length required space char
-            String name = line.substring(6, line.length());
-            current = new Attributes(12);
-            if (chunks != null) {
-                chunks.put(name, chunk);
-            }
-            entries.put(name, current);
-            while (it.hasNext()) {
-                addAttribute(it.next(), current);
-            }
-            list.clear();
-        }
-
-    }
-
-    byte[] getMainAttributesChunk() {
-        return mainAttributesChunk;
-    }
-
-    private void addLine(int length, List<String> lines) throws IOException {
-        if (encoding != null) {
-            lines.add(new String(buffer, 0, length, encoding));
-        } else {
-            if (usingUTF8) {
-                try {
-                    if (charbuf.length < length) {
-                        charbuf = new char[length];
-                    }
-                    lines.add(Util.convertUTF8WithBuf(buffer, charbuf, 0,
-                            length));
-                } catch (UTFDataFormatException e) {
-                    usingUTF8 = false;
-                }
-            }
-            if (!usingUTF8) {
-                if (charbuf.length < length) {
-                    charbuf = new char[length];
-                }
-                // If invalid UTF8, convert bytes to chars setting the upper
-                // bytes to zeros
-                int charOffset = 0;
-                int offset = 0;
-                for (int i = length; --i >= 0;) {
-                    charbuf[charOffset++] = (char) (buffer[offset++] & 0xff);
-                }
-                lines.add(new String(charbuf, 0, length));
-            }
-        }
-    }
-
-    private byte[] nextChunk(InputStream in, List<String> lines)
-            throws IOException {
-        if (inbufCount == -1) {
-            return null;
-        }
-        byte next;
-        int pos = 0;
-        boolean blankline = false, lastCr = false;
-        out.reset();
-        while (true) {
-            if (inbufPos == inbufCount) {
-                if ((inbufCount = in.read(inbuf)) == -1) {
-                    if (out.size() == 0) {
-                        return null;
-                    }
-                    if (blankline) {
-                        addLine(pos, lines);
-                    }
-                    return out.toByteArray();
-                } else {
-                    if (inbufCount == inbuf.length && in.available() == 0) {
-                        /* KA000 = "line too long" */
-                        throw new IOException(Msg.getString("KA000"));
-                    }
-                }
-                inbufPos = 0;
-            }
-            next = inbuf[inbufPos++];
-            if (lastCr) {
-                if (next != '\n') {
-                    inbufPos--;
-                    next = '\r';
-                } else {
-                    if (out.size() == 0) {
-                        continue;
-                    }
-                    out.write('\r');
-                }
-                lastCr = false;
-            } else if (next == '\r') {
-                lastCr = true;
-                continue;
-            }
-            if (blankline) {
-                if (next == ' ') {
-                    out.write(next);
-                    blankline = false;
-                    continue;
-                }
-                addLine(pos, lines);
-                if (next == '\n') {
-                    out.write(next);
-                    return out.toByteArray();
-                }
-                pos = 0;
-            } else if (next == '\n') {
-                if (out.size() == 0) {
-                    continue;
-                }
-                out.write(next);
-                blankline = true;
-                continue;
-            }
-            blankline = false;
-            out.write(next);
-            if (pos == buffer.length) {
-                byte[] newBuf = new byte[buffer.length * 2];
-                System.arraycopy(buffer, 0, newBuf, 0, buffer.length);
-                buffer = newBuf;
-            }
-            buffer[pos++] = next;
-        }
-    }
-
-    private boolean readLines(InputStream in, List<String> lines)
-            throws IOException {
-        if (inbufCount == -1) {
-            return false;
-        }
-        byte next;
-        int pos = 0;
-        boolean blankline = false, lastCr = false;
-        while (true) {
-            if (inbufPos == inbufCount) {
-                if ((inbufCount = in.read(inbuf)) == -1) {
-                    if (blankline) {
-                        addLine(pos, lines);
-                    }
-                    return lines.size() != 0;
-                } else {
-                    if (inbufCount == inbuf.length && in.available() == 0) {
-                        /* KA000 = "line too long" */
-                        throw new IOException(Msg.getString("KA000"));
-                    }
-                }
-                inbufPos = 0;
-            }
-            next = inbuf[inbufPos++];
-            if (lastCr) {
-                if (next != '\n') {
-                    inbufPos--;
-                    next = '\r';
-                }
-                lastCr = false;
-            } else if (next == '\r') {
-                lastCr = true;
-                continue;
-            }
-            if (blankline) {
-                if (next == ' ') {
-                    blankline = false;
-                    continue;
-                }
-                addLine(pos, lines);
-                if (next == '\n') {
-                    return true;
-                }
-                pos = 0;
-            } else if (next == '\n') {
-                if (pos == 0 && lines.size() == 0) {
-                    continue;
-                }
-                blankline = true;
-                continue;
-            }
-            blankline = false;
-            if (pos == buffer.length) {
-                byte[] newBuf = new byte[buffer.length * 2];
-                System.arraycopy(buffer, 0, newBuf, 0, buffer.length);
-                buffer = newBuf;
-            }
-            buffer[pos++] = next;
-        }
-    }
-
-    /* Get the next attribute and add it */
-    private void addAttribute(String line, Attributes current)
-            throws IOException {
-        String header;
-        int hdrIdx = line.indexOf(':');
-        if (hdrIdx < 1) {
-            throw new IOException(Msg.getString("K000b", line));
-        }
-        header = line.substring(0, hdrIdx);
-        Attributes.Name name = attributeNames.get(header);
-        if (name == null) {
-            try {
-                name = new Attributes.Name(header);
-            } catch (IllegalArgumentException e) {
-                throw new IOException(e.toString());
-            }
-            attributeNames.put(header, name);
-        }
-        if (hdrIdx + 1 >= line.length() || line.charAt(hdrIdx + 1) != ' ') {
-            throw new IOException(Msg.getString("K000b", line));
-        }
-        // +2 due to required SPACE char
-        current.put(name, line.substring(hdrIdx + 2, line.length()));
-    }
-}
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * 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 java.util.jar;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UTFDataFormatException;
+import java.security.AccessController;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.util.PriviAction;
+import org.apache.harmony.luni.util.Util;
+
+class InitManifest {
+    private byte[] inbuf = new byte[1024];
+
+    private int inbufCount = 0, inbufPos = 0;
+
+    private byte[] buffer = new byte[5];
+
+    private char[] charbuf = new char[0];
+
+    private ByteArrayOutputStream out = new ByteArrayOutputStream(256);
+
+    private String encoding;
+
+    private boolean usingUTF8 = true;
+
+    private Map<String, Attributes.Name> attributeNames = new HashMap<String, Attributes.Name>();
+
+    private byte[] mainAttributesChunk;
+
+    InitManifest(InputStream is, Attributes main, Map<String, Attributes> entries, Map<String, byte[]> chunks,
+            String verString) throws IOException {
+        encoding = AccessController.doPrivileged(new PriviAction<String>(
+                "manifest.read.encoding"));
+        if ("".equals(encoding)) {
+            encoding = null;
+        }
+
+        Attributes current = main;
+        ArrayList<String> list = new ArrayList<String>();
+
+        // Return the chunk of main attributes in the manifest.
+        mainAttributesChunk = nextChunk(is, list);
+
+        Iterator<String> it = list.iterator();
+        while (it.hasNext()) {
+            addAttribute(it.next(), current);
+        }
+
+        // Check for version attribute
+        if (verString != null && main.getValue(verString) == null) {
+            throw new IOException(Msg.getString("K0009", verString));
+        }
+
+        list.clear();
+        byte[] chunk = null;
+        while (chunks == null ? readLines(is, list) : (chunk = nextChunk(is,
+                list)) != null) {
+            it = list.iterator();
+            String line = it.next();
+            if (line.length() < 7
+                    || !line.substring(0, 5).toLowerCase().equals("name:")) {
+                throw new IOException(Msg.getString("K000a"));
+            }
+            // Name: length required space char
+            String name = line.substring(6, line.length());
+            current = new Attributes(12);
+            if (chunks != null) {
+                chunks.put(name, chunk);
+            }
+            entries.put(name, current);
+            while (it.hasNext()) {
+                addAttribute(it.next(), current);
+            }
+            list.clear();
+        }
+
+    }
+
+    byte[] getMainAttributesChunk() {
+        return mainAttributesChunk;
+    }
+
+    private void addLine(int length, List<String> lines) throws IOException {
+        if (encoding != null) {
+            lines.add(new String(buffer, 0, length, encoding));
+        } else {
+            if (usingUTF8) {
+                try {
+                    if (charbuf.length < length) {
+                        charbuf = new char[length];
+                    }
+                    lines.add(Util.convertUTF8WithBuf(buffer, charbuf, 0,
+                            length));
+                } catch (UTFDataFormatException e) {
+                    usingUTF8 = false;
+                }
+            }
+            if (!usingUTF8) {
+                if (charbuf.length < length) {
+                    charbuf = new char[length];
+                }
+                // If invalid UTF8, convert bytes to chars setting the upper
+                // bytes to zeros
+                int charOffset = 0;
+                int offset = 0;
+                for (int i = length; --i >= 0;) {
+                    charbuf[charOffset++] = (char) (buffer[offset++] & 0xff);
+                }
+                lines.add(new String(charbuf, 0, length));
+            }
+        }
+    }
+
+    private byte[] nextChunk(InputStream in, List<String> lines)
+            throws IOException {
+        if (inbufCount == -1) {
+            return null;
+        }
+        byte next;
+        int pos = 0;
+        boolean blankline = false, lastCr = false;
+        out.reset();
+        while (true) {
+            if (inbufPos == inbufCount) {
+                if ((inbufCount = in.read(inbuf)) == -1) {
+                    if (out.size() == 0) {
+                        return null;
+                    }
+                    if (blankline) {
+                        addLine(pos, lines);
+                    }
+                    return out.toByteArray();
+                } else {
+                    if (inbufCount == inbuf.length && in.available() == 0) {
+                        /* KA000 = "line too long" */
+                        throw new IOException(Msg.getString("KA000"));
+                    }
+                }
+                inbufPos = 0;
+            }
+            next = inbuf[inbufPos++];
+            if (lastCr) {
+                if (next != '\n') {
+                    inbufPos--;
+                    next = '\r';
+                } else {
+                    if (out.size() == 0) {
+                        continue;
+                    }
+                    out.write('\r');
+                }
+                lastCr = false;
+            } else if (next == '\r') {
+                lastCr = true;
+                continue;
+            }
+            if (blankline) {
+                if (next == ' ') {
+                    out.write(next);
+                    blankline = false;
+                    continue;
+                }
+                addLine(pos, lines);
+                if (next == '\n') {
+                    out.write(next);
+                    return out.toByteArray();
+                }
+                pos = 0;
+            } else if (next == '\n') {
+                if (out.size() == 0) {
+                    continue;
+                }
+                out.write(next);
+                blankline = true;
+                continue;
+            }
+            blankline = false;
+            out.write(next);
+            if (pos == buffer.length) {
+                byte[] newBuf = new byte[buffer.length * 2];
+                System.arraycopy(buffer, 0, newBuf, 0, buffer.length);
+                buffer = newBuf;
+            }
+            buffer[pos++] = next;
+        }
+    }
+
+    private boolean readLines(InputStream in, List<String> lines)
+            throws IOException {
+        if (inbufCount == -1) {
+            return false;
+        }
+        byte next;
+        int pos = 0;
+        boolean blankline = false, lastCr = false;
+        while (true) {
+            if (inbufPos == inbufCount) {
+                if ((inbufCount = in.read(inbuf)) == -1) {
+                    if (blankline) {
+                        addLine(pos, lines);
+                    }
+                    return lines.size() != 0;
+                } else {
+                    if (inbufCount == inbuf.length && in.available() == 0) {
+                        /* KA000 = "line too long" */
+                        throw new IOException(Msg.getString("KA000"));
+                    }
+                }
+                inbufPos = 0;
+            }
+            next = inbuf[inbufPos++];
+            if (lastCr) {
+                if (next != '\n') {
+                    inbufPos--;
+                    next = '\r';
+                }
+                lastCr = false;
+            } else if (next == '\r') {
+                lastCr = true;
+                continue;
+            }
+            if (blankline) {
+                if (next == ' ') {
+                    blankline = false;
+                    continue;
+                }
+                addLine(pos, lines);
+                if (next == '\n') {
+                    return true;
+                }
+                pos = 0;
+            } else if (next == '\n') {
+                if (pos == 0 && lines.size() == 0) {
+                    continue;
+                }
+                blankline = true;
+                continue;
+            }
+            blankline = false;
+            if (pos == buffer.length) {
+                byte[] newBuf = new byte[buffer.length * 2];
+                System.arraycopy(buffer, 0, newBuf, 0, buffer.length);
+                buffer = newBuf;
+            }
+            buffer[pos++] = next;
+        }
+    }
+
+    /* Get the next attribute and add it */
+    private void addAttribute(String line, Attributes current)
+            throws IOException {
+        String header;
+        int hdrIdx = line.indexOf(':');
+        if (hdrIdx < 1) {
+            throw new IOException(Msg.getString("K000b", line));
+        }
+        header = line.substring(0, hdrIdx);
+        Attributes.Name name = attributeNames.get(header);
+        if (name == null) {
+            try {
+                name = new Attributes.Name(header);
+            } catch (IllegalArgumentException e) {
+                throw new IOException(e.toString());
+            }
+            attributeNames.put(header, name);
+        }
+        if (hdrIdx + 1 >= line.length() || line.charAt(hdrIdx + 1) != ' ') {
+            throw new IOException(Msg.getString("K000b", line));
+        }
+        // +2 due to required SPACE char
+        current.put(name, line.substring(hdrIdx + 2, line.length()));
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java Thu Sep 14 19:40:33 2006
@@ -1,203 +1,203 @@
-/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
- * 
- * 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 java.util.jar;
-
-import java.io.IOException;
-import java.security.CodeSigner;
-import java.security.cert.CertPath;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.zip.ZipEntry;
-
-import javax.security.auth.x500.X500Principal;
-
-public class JarEntry extends ZipEntry {
-    private Attributes attributes;
-
-    JarFile parentJar;
-
-    Certificate certificates[];
-
-    CodeSigner signers[];
-
-    // Cached factory used to build CertPath-s in <code>getCodeSigners()</code>.
-    private CertificateFactory factory;
-
-    private boolean isFactoryChecked = false;
-
-    /**
-     * Create a new JarEntry named name
-     * 
-     * @param name
-     *            The name of the new JarEntry
-     */
-    public JarEntry(String name) {
-        super(name);
-    }
-
-    /**
-     * Create a new JarEntry using the values obtained from entry.
-     * 
-     * @param entry
-     *            The ZipEntry to obtain values from.
-     */
-    public JarEntry(ZipEntry entry) {
-        super(entry);
-    }
-
-    /**
-     * Returns the Attributes object associated with this entry or null if none
-     * exists.
-     * 
-     * @return java.util.jar.Attributes Attributes for this entry
-     * @exception java.io.IOException
-     *                If an error occurs obtaining the Attributes
-     */
-    public Attributes getAttributes() throws IOException {
-        if (attributes != null || parentJar == null) {
-            return attributes;
-        }
-        Manifest manifest = parentJar.getManifest();
-        if (manifest == null) {
-            return null;
-        }
-        return attributes = manifest.getAttributes(getName());
-    }
-
-    /**
-     * Returns an array of Certificate Objects associated with this entry or
-     * null if none exist.
-     * 
-     * @return java.security.cert.Certificate[] Certificates for this entry
-     */
-    public Certificate[] getCertificates() {
-        return certificates;
-    }
-
-    void setAttributes(Attributes attrib) {
-        attributes = attrib;
-    }
-
-    /**
-     * Create a new JarEntry using the values obtained from je.
-     * 
-     * @param je
-     *            The JarEntry to obtain values from
-     */
-    public JarEntry(JarEntry je) {
-        super(je);
-        parentJar = je.parentJar;
-        attributes = je.attributes;
-        certificates = je.certificates;
-        signers = je.signers;
-
-    }
-
-    /**
-     * Returns the code signers for the jar entry. If there is no such code
-     * signers, returns null. Only when the jar entry has been completely
-     * verified by reading till the end of the jar entry, can the method be
-     * called. Or else the method will return null.
-     * 
-     * @return the code signers for the jar entry.
-     */
-    public CodeSigner[] getCodeSigners() {
-        if (null == signers) {
-            signers = getCodeSigners(certificates);
-
-        }
-        if (null == signers) {
-            return null;
-        }
-
-        CodeSigner[] tmp = new CodeSigner[signers.length];
-        System.arraycopy(signers, 0, tmp, 0, tmp.length);
-        return tmp;
-
-    }
-
-    private CodeSigner[] getCodeSigners(Certificate[] certs) {
-        if(null == certs) {
-            return null;
-        }
-
-        X500Principal prevIssuer = null;
-        ArrayList<Certificate> list = new ArrayList<Certificate>(certs.length);
-        ArrayList<CodeSigner> asigners = new ArrayList<CodeSigner>();
-
-        for (Certificate element : certs) {
-            if (!(element instanceof X509Certificate)) {
-                // Only X509CErtificate-s are taken into account - see API spec.
-                continue;
-            }
-            X509Certificate x509 = (X509Certificate) element;
-            if (null != prevIssuer) {
-                X500Principal subj = x509.getSubjectX500Principal();
-                if (!prevIssuer.equals(subj)) {
-                    // Ok, this ends the previous chain,
-                    // so transform this one into CertPath ...
-                    addCodeSigner(asigners, list);
-                    // ... and start a new one
-                    list.clear();
-                }// else { it's still the same chain }
-
-            }
-            prevIssuer = x509.getIssuerX500Principal();
-            list.add(x509);
-        }
-        if (!list.isEmpty()) {
-            addCodeSigner(asigners, list);
-        }
-        if (asigners.isEmpty()) {
-            // 'signers' is 'null' already
-            return null;
-        }
-
-        CodeSigner[] tmp = new CodeSigner[asigners.size()];
-        asigners.toArray(tmp);
-        return tmp;
-
-    }
-
-    private void addCodeSigner(ArrayList<CodeSigner> asigners,
-            List<Certificate> list) {
-        CertPath certPath = null;
-        if (!isFactoryChecked) {
-            try {
-                factory = CertificateFactory.getInstance("X.509");
-            } catch (CertificateException ex) {
-                // do nothing
-            } finally {
-                isFactoryChecked = true;
-            }
-        }
-        if (null == factory) {
-            return;
-        }
-        try {
-            certPath = factory.generateCertPath(list);
-        } catch (CertificateException ex) {
-            // do nothing
-        }
-        if (null != certPath) {
-            asigners.add(new CodeSigner(certPath, null));
-        }
-    }
-}
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * 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 java.util.jar;
+
+import java.io.IOException;
+import java.security.CodeSigner;
+import java.security.cert.CertPath;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.zip.ZipEntry;
+
+import javax.security.auth.x500.X500Principal;
+
+public class JarEntry extends ZipEntry {
+    private Attributes attributes;
+
+    JarFile parentJar;
+
+    Certificate certificates[];
+
+    CodeSigner signers[];
+
+    // Cached factory used to build CertPath-s in <code>getCodeSigners()</code>.
+    private CertificateFactory factory;
+
+    private boolean isFactoryChecked = false;
+
+    /**
+     * Create a new JarEntry named name
+     * 
+     * @param name
+     *            The name of the new JarEntry
+     */
+    public JarEntry(String name) {
+        super(name);
+    }
+
+    /**
+     * Create a new JarEntry using the values obtained from entry.
+     * 
+     * @param entry
+     *            The ZipEntry to obtain values from.
+     */
+    public JarEntry(ZipEntry entry) {
+        super(entry);
+    }
+
+    /**
+     * Returns the Attributes object associated with this entry or null if none
+     * exists.
+     * 
+     * @return java.util.jar.Attributes Attributes for this entry
+     * @exception java.io.IOException
+     *                If an error occurs obtaining the Attributes
+     */
+    public Attributes getAttributes() throws IOException {
+        if (attributes != null || parentJar == null) {
+            return attributes;
+        }
+        Manifest manifest = parentJar.getManifest();
+        if (manifest == null) {
+            return null;
+        }
+        return attributes = manifest.getAttributes(getName());
+    }
+
+    /**
+     * Returns an array of Certificate Objects associated with this entry or
+     * null if none exist.
+     * 
+     * @return java.security.cert.Certificate[] Certificates for this entry
+     */
+    public Certificate[] getCertificates() {
+        return certificates;
+    }
+
+    void setAttributes(Attributes attrib) {
+        attributes = attrib;
+    }
+
+    /**
+     * Create a new JarEntry using the values obtained from je.
+     * 
+     * @param je
+     *            The JarEntry to obtain values from
+     */
+    public JarEntry(JarEntry je) {
+        super(je);
+        parentJar = je.parentJar;
+        attributes = je.attributes;
+        certificates = je.certificates;
+        signers = je.signers;
+
+    }
+
+    /**
+     * Returns the code signers for the jar entry. If there is no such code
+     * signers, returns null. Only when the jar entry has been completely
+     * verified by reading till the end of the jar entry, can the method be
+     * called. Or else the method will return null.
+     * 
+     * @return the code signers for the jar entry.
+     */
+    public CodeSigner[] getCodeSigners() {
+        if (null == signers) {
+            signers = getCodeSigners(certificates);
+
+        }
+        if (null == signers) {
+            return null;
+        }
+
+        CodeSigner[] tmp = new CodeSigner[signers.length];
+        System.arraycopy(signers, 0, tmp, 0, tmp.length);
+        return tmp;
+
+    }
+
+    private CodeSigner[] getCodeSigners(Certificate[] certs) {
+        if(null == certs) {
+            return null;
+        }
+
+        X500Principal prevIssuer = null;
+        ArrayList<Certificate> list = new ArrayList<Certificate>(certs.length);
+        ArrayList<CodeSigner> asigners = new ArrayList<CodeSigner>();
+
+        for (Certificate element : certs) {
+            if (!(element instanceof X509Certificate)) {
+                // Only X509CErtificate-s are taken into account - see API spec.
+                continue;
+            }
+            X509Certificate x509 = (X509Certificate) element;
+            if (null != prevIssuer) {
+                X500Principal subj = x509.getSubjectX500Principal();
+                if (!prevIssuer.equals(subj)) {
+                    // Ok, this ends the previous chain,
+                    // so transform this one into CertPath ...
+                    addCodeSigner(asigners, list);
+                    // ... and start a new one
+                    list.clear();
+                }// else { it's still the same chain }
+
+            }
+            prevIssuer = x509.getIssuerX500Principal();
+            list.add(x509);
+        }
+        if (!list.isEmpty()) {
+            addCodeSigner(asigners, list);
+        }
+        if (asigners.isEmpty()) {
+            // 'signers' is 'null' already
+            return null;
+        }
+
+        CodeSigner[] tmp = new CodeSigner[asigners.size()];
+        asigners.toArray(tmp);
+        return tmp;
+
+    }
+
+    private void addCodeSigner(ArrayList<CodeSigner> asigners,
+            List<Certificate> list) {
+        CertPath certPath = null;
+        if (!isFactoryChecked) {
+            try {
+                factory = CertificateFactory.getInstance("X.509");
+            } catch (CertificateException ex) {
+                // do nothing
+            } finally {
+                isFactoryChecked = true;
+            }
+        }
+        if (null == factory) {
+            return;
+        }
+        try {
+            certPath = factory.generateCertPath(list);
+        } catch (CertificateException ex) {
+            // do nothing
+        }
+        if (null != certPath) {
+            asigners.add(new CodeSigner(certPath, null));
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java?view=diff&rev=446478&r1=446477&r2=446478
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java Thu Sep 14 19:40:33 2006
@@ -1,45 +1,45 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
- * 
- * 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 java.util.jar;
-
-import java.util.zip.ZipException;
-
-/**
- * This runtime exception is thrown when a problem occurrs while reading a JAR
- * file.
- */
-public class JarException extends ZipException {
-
-    private static final long serialVersionUID = 7159778400963954473L;
-
-    /**
-     * Constructs a new instance of this class with its walkback filled in.
-     */
-    public JarException() {
-        super();
-    }
-
-    /**
-     * Constructs a new instance of this class with its walkback and message
-     * filled in.
-     * 
-     * @param detailMessage
-     *            String The detail message for the exception.
-     */
-    public JarException(String detailMessage) {
-        super(detailMessage);
-    }
-}
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * 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 java.util.jar;
+
+import java.util.zip.ZipException;
+
+/**
+ * This runtime exception is thrown when a problem occurrs while reading a JAR
+ * file.
+ */
+public class JarException extends ZipException {
+
+    private static final long serialVersionUID = 7159778400963954473L;
+
+    /**
+     * Constructs a new instance of this class with its walkback filled in.
+     */
+    public JarException() {
+        super();
+    }
+
+    /**
+     * Constructs a new instance of this class with its walkback and message
+     * filled in.
+     * 
+     * @param detailMessage
+     *            String The detail message for the exception.
+     */
+    public JarException(String detailMessage) {
+        super(detailMessage);
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarException.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message