geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/activation/xdocs navigation.xml
Date Thu, 29 Jan 2004 04:28:53 GMT
dain        2004/01/28 20:28:53

  Added:       sandbox/activation .cvsignore LICENSE.txt
                        README-IMPORTANT-DEVELOPERS.txt project.xml
               sandbox/activation/src/java/javax/activation
                        ActivationDataFlavor.java CommandInfo.java
                        CommandMap.java CommandObject.java
                        DataContentHandler.java
                        DataContentHandlerFactory.java DataHandler.java
                        DataSource.java FileDataSource.java
                        FileTypeMap.java MailcapCommandMap.java
                        MimeType.java MimeTypeParameterList.java
                        MimeTypeParseException.java
                        MimetypesFileTypeMap.java URLDataSource.java
                        UnsupportedDataTypeException.java
               sandbox/activation/src/test/javax/activation
                        MimeTypeParameterListTest.java MimeTypeTest.java
               sandbox/activation/xdocs navigation.xml
  Log:
  Moved from spec/activation
  
  Revision  Changes    Path
  1.1                  incubator-geronimo/sandbox/activation/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  .project
  .classpath
  maven.log
  junit*.properties
  target
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/LICENSE.txt
  
  Index: LICENSE.txt
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/README-IMPORTANT-DEVELOPERS.txt
  
  Index: README-IMPORTANT-DEVELOPERS.txt
  ===================================================================
  This is just a placeholder at the moment. The JavaMail stuff depends on
  classes in this package being here, so there are empty implementations
  that allow the JavaMail stuff to compile.
  
  As it gets more implemented, these will be replaced with more
  recent versions (and this file can be deleted).
  
  Alex Blewitt.
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/project.xml
  
  Index: project.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Revision: 1.1 $ $Date $ -->
  
  <project>
      <pomVersion>3</pomVersion>
      <extend>${basedir}/../../etc/project.xml</extend>
  
      <name>Geronimo :: Java Activation Framework Specification</name>
      <groupId>geronimo-sandbox</groupId>
      <id>geronimo-sandbox-activation</id>
      <shortDescription></shortDescription>
      <description></description>
      <siteDirectory></siteDirectory>
      <distributionDirectory></distributionDirectory>
  
      <package>javax.activation</package>
      <currentVersion>DEV</currentVersion>
  
  </project>
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/ActivationDataFlavor.java
  
  Index: ActivationDataFlavor.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
   
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.awt.datatransfer.DataFlavor;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class ActivationDataFlavor extends DataFlavor {
      public ActivationDataFlavor(Class representationClass, String mimeType, String humanPresentableName) {
          /*@todo implement*/
      }
  
      public ActivationDataFlavor(Class representationClass, String humanPresentableName) {
          /*@todo implement*/
      }
  
      public ActivationDataFlavor(String mimeType, String humanPresentableName) {
          /*@todo implement*/
      }
  
      public String getMimeType() {
          /*@todo implement*/
          return null;
      }
  
      public Class getRepresentationClass() {
          /*@todo implement*/
          return null;
      }
  
      public String getHumanPresentableName() {
          /*@todo implement*/
          return null;
      }
  
      public void setHumanPresentableName(String humanPresentableName) {
          /*@todo implement*/
      }
  
      public boolean equals(DataFlavor dataFlavor) {
          /*@todo implement*/
          return false;
      }
  
      public boolean isMimeTypeEqual(String mimeType) {
          /*@todo implement*/
          return false;
      }
  
      protected String normalizeMimeTypeParameter(String parameterName, String parameterValue) {
          /*@todo implement*/
          return null;
      }
  
      protected String normalizeMimeType(String mimeType) {
          /*@todo implement*/
          return null;
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/CommandInfo.java
  
  Index: CommandInfo.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
   
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class CommandInfo {
      public CommandInfo(String verb, String className) {
          /*@todo implement*/
      }
  
      public String getCommandName() {
          /*@todo implement*/
          return null;
      }
  
      public String getCommandClass() {
          /*@todo implement*/
          return null;
      }
  
      public Object getCommandObject(DataHandler dh, ClassLoader loader) throws IOException, ClassNotFoundException {
          /*@todo implement*/
          return null;
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/CommandMap.java
  
  Index: CommandMap.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
   //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public abstract class CommandMap {
      public CommandMap() {
          /*@todo implement*/
      }
  
      public static CommandMap getDefaultCommandMap() {
          /*@todo implement*/
          return null;
      }
  
      public static void setDefaultCommandMap(CommandMap commandMap) {
          /*@todo implement*/
      }
  
      public abstract CommandInfo[] getPreferredCommands(String mimeType);
  
      public abstract CommandInfo[] getAllCommands(String mimeType);
  
      public abstract CommandInfo getCommand(String mimeType, String cmdName);
  
      public abstract DataContentHandler createDataContentHandler(String mimeType);
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/CommandObject.java
  
  Index: CommandObject.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public interface CommandObject {
      public void setCommandContext(String verb, DataHandler dh) throws IOException;
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/DataContentHandler.java
  
  Index: DataContentHandler.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.awt.datatransfer.DataFlavor;
  import java.awt.datatransfer.UnsupportedFlavorException;
  import java.io.IOException;
  import java.io.OutputStream;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public interface DataContentHandler {
      public DataFlavor[] getTransferDataFlavors();
  
      public Object getTransferData(DataFlavor df, DataSource ds) throws UnsupportedFlavorException, IOException;
  
      public Object getContent(DataSource ds) throws IOException;
  
      public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException;
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/DataContentHandlerFactory.java
  
  Index: DataContentHandlerFactory.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public interface DataContentHandlerFactory {
      public DataContentHandler createDataContentHandler(String mimeType);
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/DataHandler.java
  
  Index: DataHandler.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.awt.datatransfer.DataFlavor;
  import java.awt.datatransfer.Transferable;
  import java.awt.datatransfer.UnsupportedFlavorException;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.net.URL;
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class DataHandler implements Transferable {
      private DataSource _ds;
      public DataHandler(DataSource ds) {
          _ds = ds;
      }
  
      public DataHandler(Object data, String type) {
          _ds = new ObjectDataSource(data, type);
      }
  
      static class ObjectDataSource implements DataSource {
  
          private Object _data;
          private String _type;
          public Object getContent() {
              return _data;
          }
          /**
           * Store an object as a data source type
           * @param data the object
           * @param type the mimeType
           */
          public ObjectDataSource(Object data, String type) {
              _data = data;
              _type = type;
          }
  
          /* (non-Javadoc)
           * @see javax.activation.DataSource#getInputStream()
           */
          public InputStream getInputStream() throws IOException {
              // TODO Auto-generated method stub
              return null;
          }
  
          /* (non-Javadoc)
           * @see javax.activation.DataSource#getOutputStream()
           */
          public OutputStream getOutputStream() throws IOException {
              // TODO Auto-generated method stub
              return null;
          }
  
          /* (non-Javadoc)
           * @see javax.activation.DataSource#getContentType()
           */
          public String getContentType() {
              // TODO Auto-generated method stub
              return null;
          }
  
          /* (non-Javadoc)
           * @see javax.activation.DataSource#getName()
           */
          public String getName() {
              // TODO Auto-generated method stub
              return null;
          }
  
      }
      public DataHandler(URL url) {
          /*@todo implement*/
      }
  
      public DataSource getDataSource() {
          return _ds;
      }
  
      public String getName() {
          /*@todo implement*/
          return null;
      }
  
      public String getContentType() {
          return _ds.getContentType();
      }
  
      public InputStream getInputStream() throws IOException {
          return _ds.getInputStream();
      }
  
      public void writeTo(OutputStream os) throws IOException {
          // TODO implement
      }
  
      public OutputStream getOutputStream() throws IOException {
          return _ds.getOutputStream();
      }
  
      public synchronized DataFlavor[] getTransferDataFlavors() {
          /*@todo implement*/
          return null;
      }
  
      public boolean isDataFlavorSupported(DataFlavor flavor) {
          /*@todo implement*/
          return false;
      }
  
      public Object getTransferData(DataFlavor flavor)
          throws UnsupportedFlavorException, IOException {
          /*@todo implement*/
          return null;
      }
  
      public synchronized void setCommandMap(CommandMap commandMap) {
          /*@todo implement*/
      }
  
      public CommandInfo[] getPreferredCommands() {
          /*@todo implement*/
          return null;
      }
  
      public CommandInfo[] getAllCommands() {
          /*@todo implement*/
          return null;
      }
  
      public CommandInfo getCommand(String cmdName) {
          /*@todo implement*/
          return null;
      }
  
      public Object getContent() throws IOException {
          if (_ds instanceof ObjectDataSource) {
              return ((ObjectDataSource) _ds).getContent();
          } else {
              // TODO not yet implemented
              throw new IOException("TODO Not yet implemented");
          }
      }
  
      public Object getBean(CommandInfo cmdinfo) {
          /*@todo implement*/
          return null;
      }
  
      public static synchronized void setDataContentHandlerFactory(DataContentHandlerFactory newFactory) {
      }
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/DataSource.java
  
  Index: DataSource.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public interface DataSource {
      public abstract InputStream getInputStream() throws IOException;
      public abstract OutputStream getOutputStream() throws IOException;
      public abstract String getContentType();
      public abstract String getName();
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/FileDataSource.java
  
  Index: FileDataSource.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.File;
  import java.io.FileInputStream;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class FileDataSource implements DataSource {
  
      private File file;
      private FileTypeMap fileTypeMap;
  
      /**
       * Creates a FileDataSource from a File object
       */
      public FileDataSource(File file) {
          this.file = file;
      }
  
      /**
       * Creates a FileDataSource from the specified path name
       */
      public FileDataSource(String name) {
          this(new File(name));
      }
  
      /**
       * Return the InputStream obtained from the data source
       */
      public InputStream getInputStream() throws IOException {
          return new FileInputStream(file);
      }
  
      /**
       * Return the OutputStream obtained from the data source
       */
      public OutputStream getOutputStream() throws IOException {
          return new FileOutputStream(file);
      }
  
      /**
       * Returns the content type of the data source
       */
      public String getContentType() {
          if (fileTypeMap == null)
              return FileTypeMap.getDefaultFileTypeMap().getContentType(file);
  
          return fileTypeMap.getContentType(file);
      }
  
      /**
       * Returns the name of the data source object
       */
      public String getName() {
          return file.getName();
      }
  
      /**
       * Returns the data source file
       */
      public File getFile() {
          return file;
      }
  
      /**
       * Sets the FileTypeMap associated with the data source
       */
      public void setFileTypeMap(FileTypeMap map) {
          fileTypeMap = map;
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/FileTypeMap.java
  
  Index: FileTypeMap.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.File;
  
  /**
   * FileTypeMap is an abstract class that provides a data type interface for files.
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public abstract class FileTypeMap {
  	
  	private static FileTypeMap defaultFileTypeMap;
  
      public FileTypeMap() {
      }
  
      public abstract String getContentType(File file);
  
      public abstract String getContentType(String filename);
  
  	/**
  	 * Sets the default FileTypeMap for the system
  	 */
      public static void setDefaultFileTypeMap(FileTypeMap map) {
          defaultFileTypeMap = map;
      }
  
  	/**
  	 * Returns the default FileTypeMap
  	 */
      public static FileTypeMap getDefaultFileTypeMap() {
          if (defaultFileTypeMap==null)
          	return new MimetypesFileTypeMap();
          return defaultFileTypeMap;
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/MailcapCommandMap.java
  
  Index: MailcapCommandMap.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class MailcapCommandMap extends CommandMap {
      public MailcapCommandMap() {
          /*@todo implement*/
      }
  
      public MailcapCommandMap(String fileName) throws IOException {
          /*@todo implement*/
      }
  
      public MailcapCommandMap(InputStream is) {
          /*@todo implement*/
      }
  
      public synchronized CommandInfo[] getPreferredCommands(String mimeType) {
          /*@todo implement*/
          return null;
      }
  
      public synchronized CommandInfo[] getAllCommands(String mimeType) {
          /*@todo implement*/
          return null;
      }
  
      public synchronized CommandInfo getCommand(String mimeType, String cmdName) {
          /*@todo implement*/
          return null;
      }
  
      public synchronized void addMailcap(String mail_cap) {
          /*@todo implement*/
      }
  
      public synchronized DataContentHandler createDataContentHandler(String mimeType) {
          /*@todo implement*/
          return null;
      }
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/MimeType.java
  
  Index: MimeType.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.Externalizable;
  import java.io.IOException;
  import java.io.ObjectInput;
  import java.io.ObjectOutput;
  
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class MimeType implements Externalizable {
      private final static String TYPE_SEPARATOR = "/";
      private final static String PARAMETER_SEPARATOR = ";";
      private final static String STAR_SUB_TYPE = "*";
  
      private String primaryType = "text";
      private String subType = "plain";
      private MimeTypeParameterList parameterList = new MimeTypeParameterList();;
  
      public MimeType() {
      }
  
      public MimeType(String rawdata) throws MimeTypeParseException {
          parseMimeType(rawdata);
      }
  
      public MimeType(String primary, String sub) throws MimeTypeParseException {
          setPrimaryType(primary);
          setSubType(sub);
      }
  
      public String getPrimaryType() {
          return primaryType;
      }
  
      public void setPrimaryType(String primary) throws MimeTypeParseException {
          primaryType = parseToken(primary);
      }
  
      public String getSubType() {
          return subType;
      }
  
      public void setSubType(String sub) throws MimeTypeParseException {
          subType = parseToken(sub);
      }
  
      public MimeTypeParameterList getParameters() {
          return parameterList;
      }
  
      public String getParameter(String name) {
          return parameterList.get(name);
      }
  
      public void setParameter(String name, String value) {
          parameterList.set(name, value);
      }
  
      public void removeParameter(String name) {
          parameterList.remove(name);
      }
  
      public String toString() {
          return getBaseType() +
                  (parameterList == null
                  ? ""
                  : PARAMETER_SEPARATOR + parameterList.toString());
      }
  
      public String getBaseType() {
          return getPrimaryType() + TYPE_SEPARATOR + getSubType();
      }
  
      public boolean match(MimeType type) {
          return (
                  getPrimaryType().equals(type.getPrimaryType())
                  && (getSubType().equals(STAR_SUB_TYPE)
                  || type.getSubType().equals(STAR_SUB_TYPE)
                  || getSubType().equals(type.getSubType())));
      }
  
      public boolean match(String rawdata) throws MimeTypeParseException {
          return match(new MimeType(rawdata));
      }
  
      public void writeExternal(ObjectOutput out) throws IOException {
          out.writeUTF(toString());
          out.flush();
      }
  
      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
          try {
              parseMimeType(in.readUTF());
          } catch (MimeTypeParseException mtpex) {
              throw new IOException(mtpex.getMessage());
          }
      }
  
      private void parseMimeType(String rawData) throws MimeTypeParseException {
          int typeSeparatorPos = rawData.indexOf(TYPE_SEPARATOR);
          int parameterSeparatorPos = rawData.indexOf(PARAMETER_SEPARATOR);
  
          if (typeSeparatorPos < 0) {
              throw new MimeTypeParseException("Unable to find subtype");
          }
  
          setPrimaryType(rawData.substring(0, typeSeparatorPos));
          if (parameterSeparatorPos < 0) {
              setSubType(rawData.substring(typeSeparatorPos + 1));
          } else {
              setSubType(rawData.substring(typeSeparatorPos + 1, parameterSeparatorPos));
              parameterList = new MimeTypeParameterList(rawData.substring(parameterSeparatorPos + 1));
          }
      }
  
      private static String parseToken(String tokenString) {
          // TODO it seems to have unauthorized chars
          return tokenString;
      }
  
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/MimeTypeParameterList.java
  
  Index: MimeTypeParameterList.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.util.Enumeration;
  import java.util.StringTokenizer;
  import java.util.Collections;
  import java.util.HashMap;
  import java.util.Map;
  
  
  /**
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class MimeTypeParameterList {
      private final static String PARAMETER_SEPARATOR = ";";
      private final static String NAME_VALUE_SEPARATOR = "=";
  
      Map _mimeTypeParameterMap = new HashMap();
  
      public MimeTypeParameterList() {
  
      }
  
      public MimeTypeParameterList(String parameterList) throws MimeTypeParseException {
          parse(parameterList);
      }
  
      protected void parse(String parameterList) throws MimeTypeParseException {
          if (parameterList == null) {
              return;
          }
  
          StringTokenizer tokenizer = new StringTokenizer(parameterList, PARAMETER_SEPARATOR);
          while (tokenizer.hasMoreTokens()) {
              String parameter = tokenizer.nextToken();
              if (parameter.length() == 0) {
                  continue;
              }
              int eq = parameter.indexOf(NAME_VALUE_SEPARATOR);
              String name = null;
              if (eq > -1) {
                  name = parseToken(parameter.substring(0, eq));
              }
              String value = parseToken(parameter.substring(eq + 1));
              if ((name == null || name.length() == 0) && value.length() == 0) {
                  continue;
              }
              if (name.length() == 0 || value.length() == 0) {
                  throw new MimeTypeParseException("Name or value is Missing");
              }
              set(name, value);
  
          }
  
      }
  
      public int size() {
          return _mimeTypeParameterMap.size();
      }
  
      public boolean isEmpty() {
          return _mimeTypeParameterMap.isEmpty();
      }
  
      public String get(String name) {
          return (String) _mimeTypeParameterMap.get(name);
      }
  
      public void set(String name, String value) {
          name = parseToken(name);
          value = parseToken(value);
          _mimeTypeParameterMap.put(name, value);
      }
  
      public void remove(String name) {
          _mimeTypeParameterMap.remove(name);
      }
  
      public Enumeration getNames() {
          return Collections.enumeration(_mimeTypeParameterMap.keySet());
      }
  
      public String toString() {
          StringBuffer buf = new StringBuffer();
          for (Enumeration enum = getNames(); enum.hasMoreElements();) {
              buf.append(PARAMETER_SEPARATOR);
              String name = (String) enum.nextElement();
              buf.append(name).append(NAME_VALUE_SEPARATOR).append(get(name));
          }
          return buf.toString();
      }
  
      private String parseToken(String token) {
          // TODO it seems to have unauthorized chars
          return removeBlank(token);
      }
  
      private String removeBlank(String str) {
          StringBuffer buf = new StringBuffer();
          StringTokenizer tokenizer = new StringTokenizer(str);
          while (tokenizer.hasMoreTokens()) {
              buf.append(tokenizer.nextToken());
          }
          return buf.toString();
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/MimeTypeParseException.java
  
  Index: MimeTypeParseException.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class MimeTypeParseException extends Exception {
      public MimeTypeParseException() {
          super();
      }
  
      public MimeTypeParseException(String s) {
          super(s);
      }
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/MimetypesFileTypeMap.java
  
  Index: MimetypesFileTypeMap.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStream;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class MimetypesFileTypeMap extends FileTypeMap {
      public MimetypesFileTypeMap() {
          /*@todo implement*/
      }
  
      public MimetypesFileTypeMap(String mimeTypeFileName) throws IOException {
          /*@todo implement*/
      }
  
      public MimetypesFileTypeMap(InputStream is) {
          /*@todo implement*/
      }
  
      public synchronized void addMimeTypes(String mime_types) {
          /*@todo implement*/
      }
  
      public String getContentType(File f) {
          /*@todo implement*/
          return null;
      }
  
      public synchronized String getContentType(String filename) {
          /*@todo implement*/
          return null;
      }
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/URLDataSource.java
  
  Index: URLDataSource.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.net.URL;
  import java.net.URLConnection;
  
  /**
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class URLDataSource implements DataSource {
  
      private URL url;
      private final static String DEFAULT_CONTENT_TYPE = "application/octet-stream";
  
      /**
       * Creates a URLDataSource from a URL object
       */
      public URLDataSource(URL url) {
          this.url = url;
      }
  
      /**
       * Returns the value of the URL content-type header field
       * 
       */
      public String getContentType() {
          URLConnection connection = null;
          try {
              connection = url.openConnection();
          } catch (IOException e) {
          }
          if (connection == null)
              return DEFAULT_CONTENT_TYPE;
  
          return connection.getContentType();
  
      }
  
      /**
       * Returns the file name of the URL object
       */
      public String getName() {
          return url.getFile();
      }
  
      /**
       * Returns an InputStream obtained from the data source
       */
      public InputStream getInputStream() throws IOException {
          return url.openStream();
      }
  
      /**
       * Returns an OutputStream obtained from the data source
       */
      public OutputStream getOutputStream() throws IOException {
  
          URLConnection connection = url.openConnection();
          if (connection == null)
              return null;
  
          connection.setDoOutput(true); //is it necessary?
          return connection.getOutputStream();
      }
  
      /**
       * Returns the URL of the data source
       */
      public URL getURL() {
          return url;
      }
  }
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/java/javax/activation/UnsupportedDataTypeException.java
  
  Index: UnsupportedDataTypeException.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  
  //
  // This source code implements specifications defined by the Java
  // Community Process. In order to remain compliant with the specification
  // DO NOT add / change / or delete method signatures!
  //
  
  package javax.activation;
  
  import java.io.IOException;
  
  /**
   *
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:52 $
   */
  public class UnsupportedDataTypeException extends IOException {
      public UnsupportedDataTypeException() {
          super();
      }
  
      public UnsupportedDataTypeException(String s) {
          super(s);
      }
  }
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/test/javax/activation/MimeTypeParameterListTest.java
  
  Index: MimeTypeParameterListTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http:www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http:www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.activation;
  
  import junit.framework.TestCase;
  
  
  /**
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:53 $
   */
  public class MimeTypeParameterListTest extends TestCase {
  
  	private String simpleParameterListStr;
  	private String withWhiteSpacesParameterListStr;
  	private String longParameterListStr;
  	private String noNameParameterListStr;
  	private String noValueParameterListStr;
  
  	public MimeTypeParameterListTest(String name) {
  		super(name);
  	}
  
  	protected void setUp() throws Exception {
  		super.setUp();
  		simpleParameterListStr = ";name=value";
  		withWhiteSpacesParameterListStr = "; name= value ;  ";
  		longParameterListStr = "; name1 =value1;;   ; name2= value2;name3= value3;name4  =value4;";
  		noNameParameterListStr = "; = value";
  		noValueParameterListStr = "; name=";
  	}
  
  	public void testEmptyParameterList() {
  		MimeTypeParameterList parameterList = new MimeTypeParameterList();
  		assertEquals(0, parameterList.size());
  	}
  
  	public void testSimpleParameterList() throws MimeTypeParseException {
  		MimeTypeParameterList parameterList = new MimeTypeParameterList(simpleParameterListStr);
  		assertEquals(simpleParameterListStr, parameterList.toString());
  	}
  
  	public void testWhiteSpacesParameterList() throws MimeTypeParseException {
  		MimeTypeParameterList parameterList = new MimeTypeParameterList(withWhiteSpacesParameterListStr);
  		assertEquals(simpleParameterListStr, parameterList.toString());
  	}
  
  	public void testLongParameterList() throws MimeTypeParseException {
  		MimeTypeParameterList parameterList = new MimeTypeParameterList(longParameterListStr);
  		assertEquals(4, parameterList.size());
  		assertEquals("value1", parameterList.get("name1"));
  		assertEquals("value2", parameterList.get("name2"));
  		assertEquals("value3", parameterList.get("name3"));
  		assertEquals("value4", parameterList.get("name4"));
  	}
  
  	public void testNoNameParameterList() {
  		boolean catched = false;
  		try {
  			MimeTypeParameterList parameterList = new MimeTypeParameterList(noNameParameterListStr);
  		} catch (MimeTypeParseException mtpEx) {
  			catched = true;
  		}
  		assertTrue(catched);
  	}
  
  	public void testNoValueParameterList() {
  		boolean catched = false;
  		try {
  			MimeTypeParameterList parameterList = new MimeTypeParameterList(noValueParameterListStr);
  		} catch (MimeTypeParseException mtpEx) {
  			catched = true;
  		}
  		assertTrue(catched);
  	}
  }
  
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/src/test/javax/activation/MimeTypeTest.java
  
  Index: MimeTypeTest.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http:www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http:www.apache.org/>.
   *
   * ====================================================================
   */
  package javax.activation;
  
  import junit.framework.TestCase;
  
  
  /**
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/29 04:28:53 $
   */
  public class MimeTypeTest extends TestCase {
  
  	private final static String DEFAULT_PRIMARY_TYPE = "text";
  	private final static String DEFAULT_SUB_TYPE = "plain";
  
  	private String defaultRawdata;
  	private String primary;
  	private String sub;
  	private String withParamsRawdata;
  
  	public MimeTypeTest(String name) {
  		super(name);
  	}
  
  	public void setUp() throws Exception {
  		super.setUp();
  		defaultRawdata = "text/plain;";
  		primary = "primary";
  		sub = "sub";
  		withParamsRawdata = primary + "/" + sub + "; name1 =value1; name2 = value2;";
  	}
  
  	public void test1DefaultConstructor() {
  		MimeType mimeType = new MimeType();
  		assertEquals(DEFAULT_PRIMARY_TYPE, mimeType.getPrimaryType());
  		assertEquals(DEFAULT_SUB_TYPE, mimeType.getSubType());
  		assertEquals(0, mimeType.getParameters().size());
  		assertTrue(mimeType.match(new MimeType()));
  	}
  
  	public void test2OthersConstructor() throws MimeTypeParseException {
  		MimeType mimeType = new MimeType(defaultRawdata);
  		MimeType defaultMimeType = new MimeType();
  		assertEquals(defaultMimeType.getBaseType(), mimeType.getBaseType());
  		assertTrue(mimeType.match(defaultMimeType));
  
  		mimeType = new MimeType(withParamsRawdata);
  		assertEquals(primary, mimeType.getPrimaryType());
  		assertEquals(sub, mimeType.getSubType());
  		assertEquals(2, mimeType.getParameters().size());
  		assertEquals("value1", mimeType.getParameter("name1"));
  
  		MimeType mimeType2 = new MimeType(primary, sub);
  		assertEquals(primary, mimeType2.getPrimaryType());
  		assertEquals(sub, mimeType2.getSubType());
  		assertTrue(mimeType2.match(mimeType));
  	}
  
  	public void test3MatchMethods() throws MimeTypeParseException {
  		assertTrue(new MimeType().match(new MimeType()));
  		assertTrue(new MimeType().match(defaultRawdata));
  	}
  
  	public void test4ExternalMethods() {
  		// TODO
  	}
  }
  
  
  
  
  1.1                  incubator-geronimo/sandbox/activation/xdocs/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!-- $Revision: 1.1 $ $Date: 2004/01/29 04:28:53 $ -->
  
  <project>
    
    <body>
      <links>
        <item name="Apache" href="http://apache.org"/>
        <item name="Geronimo" href="../../index.html"/>
      </links>
  
      <footer><div>Java, J2EE, and JCP are trademarks or registered trademarks of
        Sun Microsystems, Inc. in the United States and other countries.</div></footer>
  
    </body>
    
  </project>
  
  
  

Mime
View raw message