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 Summary
ConstructorsConstructorDescriptionParsedAttachment(String fileName, String contentType, byte[] data, boolean inline, String contentId) Creates an instance of aParsedAttachmentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentIdrecord component.Returns the value of thecontentTyperecord component.byte[]data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.booleaninline()Returns the value of theinlinerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParsedAttachment
public ParsedAttachment(String fileName, String contentType, byte[] data, boolean inline, String contentId) Creates an instance of aParsedAttachmentrecord class.- Parameters:
fileName- the value for thefileNamerecord componentcontentType- the value for thecontentTyperecord componentdata- the value for thedatarecord componentinline- the value for theinlinerecord componentcontentId- the value for thecontentIdrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
fileName
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
data
-
inline
-
contentId
-