Class Attachment

java.lang.Object
com.mailjet.client.transactional.Attachment

public class Attachment
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    Attachment()  
  • Method Summary

    Modifier and Type Method Description
    static Attachment fromFile​(java.lang.String pathToFile)
    Creates an attachment from the file

    Methods inherited from class java.lang.Object

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

    • Attachment

      public Attachment()
  • Method Details

    • fromFile

      public static Attachment fromFile​(java.lang.String pathToFile) throws java.io.IOException
      Creates an attachment from the file
      Parameters:
      pathToFile - full path to the file
      Returns:
      constructed Attachment object
      Throws:
      java.io.IOException - if something wrong with reading file under the given path