Package robaho.net.httpserver.extras
Record Class MultipartFormParser.Part
java.lang.Object
java.lang.Record
robaho.net.httpserver.extras.MultipartFormParser.Part
- Record Components:
contentType- if non-null, the content type of the datafilename- if non-null, the form provided filenamedata- if non-null, contains the part data as a String.file- if non-null, points to the uploaded file data (the name may differ from filename). This file is marked as delete on exit.
- Enclosing class:
MultipartFormParser
public static record MultipartFormParser.Part(String contentType, String filename, String data, File file)
extends Record
a multipart part.
either data or file will be non-null, but not both.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.file()Returns the value of thefilerecord component.filename()Returns the value of thefilenamerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Part
Creates an instance of aPartrecord class.- Parameters:
contentType- the value for thecontentTyperecord componentfilename- the value for thefilenamerecord componentdata- the value for thedatarecord componentfile- the value for thefilerecord component
-
-
Method Details
-
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. -
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. -
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). -
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
filename
Returns the value of thefilenamerecord component.- Returns:
- the value of the
filenamerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
file
Returns the value of thefilerecord component.- Returns:
- the value of the
filerecord component
-