Record Class MimeBuilder.AttachmentData

java.lang.Object
java.lang.Record
cloud.opencode.base.email.protocol.mime.MimeBuilder.AttachmentData
Record Components:
fileName - the attachment file name | 附件文件名
contentType - the MIME content type | MIME 内容类型
data - the attachment binary data | 附件二进制数据
inline - true for inline attachment (e.g., embedded images) | 是否内嵌附件
contentId - the Content-ID for inline attachments (nullable) | 内嵌附件的 Content-ID
Enclosing class:
MimeBuilder

public static record MimeBuilder.AttachmentData(String fileName, String contentType, byte[] data, boolean inline, String contentId) extends Record
Attachment data for building MIME messages 构建 MIME 消息的附件数据
Since:
JDK 25, opencode-base-email V1.0.3
Author:
Leon Soo
  • Constructor Details

    • AttachmentData

      public AttachmentData(String fileName, String contentType, byte[] data, boolean inline, String contentId)
      Creates an instance of a AttachmentData record class.
      Parameters:
      fileName - the value for the fileName record component
      contentType - the value for the contentType record component
      data - the value for the data record component
      inline - the value for the inline record component
      contentId - the value for the contentId record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fileName

      public String fileName()
      Returns the value of the fileName record component.
      Returns:
      the value of the fileName record component
    • contentType

      public String contentType()
      Returns the value of the contentType record component.
      Returns:
      the value of the contentType record component
    • data

      public byte[] data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • inline

      public boolean inline()
      Returns the value of the inline record component.
      Returns:
      the value of the inline record component
    • contentId

      public String contentId()
      Returns the value of the contentId record component.
      Returns:
      the value of the contentId record component