Class ZKMailAttachment


  • public class ZKMailAttachment
    extends java.lang.Object
    This class represents a mail attachment. Immutable.
    Author:
    sts
    • Constructor Summary

      Constructors 
      Constructor Description
      ZKMailAttachment​(java.io.File attachmentFile)
      Builds a ZKMailAttachment by the use of a file as a parameter.
      ZKMailAttachment​(java.lang.String mimetype, java.lang.String filename, java.io.InputStream is)
      Builds a ZKMailAttachment.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFileName()
      Returns the file name of the attached file.
      java.io.InputStream getInputStream()
      Returns the input stream of this attachment.
      java.lang.String getMimeType()
      Returns the MIME type of the attachment.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZKMailAttachment

        public ZKMailAttachment​(java.lang.String mimetype,
                                java.lang.String filename,
                                java.io.InputStream is)
        Builds a ZKMailAttachment.
        Parameters:
        mimetype - The MIME-type of the attachment.
        filename - The file name of the attachment.
        is - The input stream containing the attachment.
      • ZKMailAttachment

        public ZKMailAttachment​(java.io.File attachmentFile)
                         throws java.io.FileNotFoundException
        Builds a ZKMailAttachment by the use of a file as a parameter.
        Parameters:
        attachmentFile - The to become an attachment.
        Throws:
        java.io.FileNotFoundException - Is thrown if the given file cannot be found.
    • Method Detail

      • getMimeType

        public java.lang.String getMimeType()
        Returns the MIME type of the attachment.
        Returns:
        the MIME type as String
      • getFileName

        public java.lang.String getFileName()
        Returns the file name of the attached file.
        Returns:
        the file name as String
      • getInputStream

        public java.io.InputStream getInputStream()
        Returns the input stream of this attachment.
        Returns:
        the input stream of this attachment as InputStream