Record Class ParsedMessage.ParsedAttachment

java.lang.Object
java.lang.Record
cloud.opencode.base.email.protocol.mime.ParsedMessage.ParsedAttachment
Record Components:
fileName - the attachment file name (nullable if not specified) | 附件文件名
contentType - the MIME content type | MIME 内容类型
data - the decoded attachment data | 解码后的附件数据
inline - true if the attachment is inline (Content-Disposition: inline) | 是否内嵌附件
contentId - the Content-ID for inline attachments (nullable) | 内嵌附件的 Content-ID
Enclosing class:
ParsedMessage

public static record ParsedMessage.ParsedAttachment(String fileName, String contentType, byte[] data, boolean inline, String contentId) extends Record
Parsed Attachment Record 已解析的附件记录

Contains the decoded binary data and metadata for a single MIME attachment extracted from a parsed message.

包含从已解析消息中提取的单个 MIME 附件的解码二进制数据和元数据。

Since:
JDK 25, opencode-base-email V1.0.3
Author:
Leon Soo
  • Constructor Details

    • ParsedAttachment

      public ParsedAttachment(String fileName, String contentType, byte[] data, boolean inline, String contentId)
      Creates an instance of a ParsedAttachment 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