Package de.spotnik.mail.core.message

Examples of de.spotnik.mail.core.message.Attachment


    public void testGetDispostion() throws MessagingException
    {
        assertEquals(Attachment.ATTACHMENT, attachment.getDispostion());
       
        part.setDisposition("inline");
        attachment = new Attachment((BodyPart) part);
        assertEquals("inline", attachment.getDispostion());
       
        part.setDisposition("attachment; filename=\"spotnik.gif\"");
        attachment = new Attachment((BodyPart) part);
        assertEquals(Attachment.ATTACHMENT, attachment.getDispostion());
    }
View Full Code Here


    protected void setUp() throws Exception
    {
        super.setUp();
        part = new MimeBodyPart();
        part.setFileName("spotnik.gif");
        attachment = new Attachment((BodyPart) part);
    }
View Full Code Here

        }
       
        TreeMap<String, Attachment> attachments = msg.getAttachments();
        for( String key : attachments.keySet())
        {
            Attachment attachment = attachments.get(key);
            luceneDoc.add(new Field("attachmentFilename", attachment.getFileName(), Field.Store.NO,
                                    Field.Index.TOKENIZED));
            luceneDoc.add(new Field("attachmentFilename_ph", attachment.getFileName(), Field.Store.NO,
                                    Field.Index.TOKENIZED));
            luceneDoc.add(new Field("attachmentContent", attachment.getContent(), Field.Store.NO, Field.Index.TOKENIZED));
        }
       
        for( String tag : msg.getTags())
        {
            luceneDoc.add(new Field("tags", tag, Field.Store.NO, Field.Index.TOKENIZED));
View Full Code Here

TOP

Related Classes of de.spotnik.mail.core.message.Attachment

Copyright © 2018 www.massapicom. 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.