Sorry, the patch fail I think, it's better to wait some time a next version, to have a Zip serializer more efficient.

patch < ZipSerializer.patch
patching file ZipArchiveSerializer.java
Hunk #1 FAILED at 111.
Hunk #2 FAILED at 288.
2 out of 2 hunks FAILED -- saving rejects to file ZipArchiveSerializer.java.rej



Georges


Upayavira wrote:

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: ZipSerializer.patch
Date: 12 Jun 2003, 12:29
Size: 1968 bytes.
Type: Unknown


------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

***************
*** 111,120 ****
  // TODO (2) : handle more attributes on <entry> for properties of ZipEntry
  //            (compression method and level, time, comment, etc.)
  
- public class ZipArchiveSerializer 
-     extends AbstractSerializer 
      implements Composable, Disposable {
-         
      /**
       * The namespace for elements handled by this serializer,
       * "http://apache.org/cocoon/zip-archive/1.0";.
--- 111,120 ----
  // TODO (2) : handle more attributes on <entry> for properties of ZipEntry
  //            (compression method and level, time, comment, etc.)
  
+ public class ZipArchiveSerializer
+     extends AbstractSerializer
      implements Composable, Disposable {
+ 
      /**
       * The namespace for elements handled by this serializer,
       * "http://apache.org/cocoon/zip-archive/1.0";.
***************
*** 288,297 ****
                  new SAXException("Cannot specify both 'src' and 'serializer' on a 
Zip entry '" + name + "'");
          }
  
          Source source = null;
          try {
              // Create a new Zip entry
              ZipEntry entry = new ZipEntry(name);
              this.zipOutput.putNextEntry(entry);
  
              if (src != null) {
--- 288,311 ----
                  new SAXException("Cannot specify both 'src' and 'serializer' on a 
Zip entry '" + name + "'");
          }
  
+         String method = atts.getValue("method");
+         if (method!=null) {
+             if (!method.equalsIgnoreCase("STORED") && 
!method.equalsIgnoreCase("DEFLATED")) {
+                 throw this.exception =
+                    new SAXException("Method attribute must be either STORED or 
DEFLATED");
+             }
+         }
          Source source = null;
          try {
              // Create a new Zip entry
              ZipEntry entry = new ZipEntry(name);
+ 
+             if ("STORED".equalsIgnoreCase(method)) {
+                 entry.setMethod(ZipEntry.STORED);
+             } else if ("DEFLATED".equalsIgnoreCase(method)) {
+                 entry.setMethod(ZipEntry.DEFLATED);
+             }
+ 
              this.zipOutput.putNextEntry(entry);
  
              if (src != null) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to