Record Class MultipartBody.Part
java.lang.Object
java.lang.Record
cloud.opencode.base.web.body.MultipartBody.Part
- Record Components:
name- the field name | 字段名fileName- the file name (null for text fields) | 文件名(文本字段为 null)contentType- the content type (null for text fields) | 内容类型(文本字段为 null)data- the raw bytes | 原始字节
- Enclosing class:
MultipartBody
public static record MultipartBody.Part(String name, String fileName, String contentType, byte[] data)
extends Record
Multipart Part - Represents a single part in a multipart body
Multipart Part - 表示 multipart 请求体中的单个 part
- Since:
- JDK 25, opencode-base-web V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.byte[]data()Returns a defensive copy of the data.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.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Part
-
-
Method Details
-
data
public byte[] data()Returns a defensive copy of the data. 返回数据的防御性副本。- Returns:
- the data copy | 数据副本
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
fileName
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-