Examples of ActivationDataFlavor


Examples of javax.activation.ActivationDataFlavor

    private final DataFlavor[] flavors;

    public text_xml() {
  flavors = new DataFlavor[] {
      new ActivationDataFlavor(String.class, "text/xml", "XML String"),
      new ActivationDataFlavor(String.class, "application/xml",
          "XML String"),
      new ActivationDataFlavor(StreamSource.class, "text/xml", "XML"),
      new ActivationDataFlavor(StreamSource.class, "application/xml",
          "XML")
  };
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

    private final DataFlavor[] flavors;

    public XmlDataContentHandler() throws ClassNotFoundException {
        flavors = new DataFlavor[2];
        flavors[0] = new ActivationDataFlavor(StreamSource.class, "text/xml", "XML");
        flavors[1] = new ActivationDataFlavor(StreamSource.class, "application/xml", "XML");
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

    public ImageDataContentHandler() {
        String[] mimeTypes = ImageIO.getReaderMIMETypes();
        flavor = new DataFlavor[mimeTypes.length];
        for(int i=0; i < mimeTypes.length; i++) {
            flavor[i] = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
        }
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

      //flavors = new DataFlavor[mimeTypes.length];
      for (int i = 0; i < mimeTypes.length; i++)
      {
         try
         {
            flavor = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
            flavs.add(flavor);
         }
         catch (IllegalArgumentException iae)
         {
            //This mime type is not supported
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

      //flavors = new DataFlavor[mimeTypes.length];
      for (int i = 0; i < mimeTypes.length; i++)
      {
         try
         {
            flavor = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
            flavs.add(flavor);
         }
         catch (IllegalArgumentException iae)
         {
            //This mime type is not supported
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

    public ImageDataContentHandler() {
        String[] mimeTypes = ImageIO.getReaderMIMETypes();
        flavor = new DataFlavor[mimeTypes.length];
        for(int i=0; i < mimeTypes.length; i++) {
            flavor[i] = new ActivationDataFlavor(Image.class, mimeTypes[i], "Image");
        }
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

     * return the DataFlavors for this <code>DataContentHandler</code>
     * @return The DataFlavors.
     */
    public DataFlavor[] getTransferDataFlavors() { // throws Exception;
        DataFlavor flavors[] = new DataFlavor[2];
        flavors[0] new ActivationDataFlavor(String.class, "text/plain", "text string");
        flavors[1] = new DataFlavor("text/plain", "Plain Text");
        return flavors;
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

    private final DataFlavor[] flavors;

    public XmlDataContentHandler() throws ClassNotFoundException {
        flavors = new DataFlavor[2];
        flavors[0] = new ActivationDataFlavor(StreamSource.class, "text/xml", "XML");
        flavors[1] = new ActivationDataFlavor(StreamSource.class, "application/xml", "XML");
    }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

        public DataFlavor[] getTransferDataFlavors() {
            DataFlavor adataflavor[] = new DataFlavor[2];
            try {
                adataflavor[0] =
                    new ActivationDataFlavor(
                                             Class
                                                 .forName("org.apache.wink.server.internal.activation.ActivationDataContentHandlerTest$TestResource"),
                                             "text/resource", "text string");
            } catch (Exception exception) {
            }
View Full Code Here

Examples of javax.activation.ActivationDataFlavor

    /**
     * @see org.apache.james.util.mail.handlers.AbstractDataContentHandler#computeDataFlavor()
     */
    protected ActivationDataFlavor computeDataFlavor()
    {
        return new ActivationDataFlavor(String.class,
                "message/disposition-notification", "Message String");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.