com.vaadin.flow.server.streams.
Record Class UploadMetadata
Metadata for successful upload.
The fileName and contentType will only be available for multipart uploads.
-
Constructor Summary
ConstructorsConstructorDescriptionUploadMetadata
(String fileName, String contentType, long contentLength) Creates an instance of a
UploadMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the value of the
contentLength
record component.Returns the value of the
contentType
record component.final boolean
Indicates whether some other object is "equal to" this one.
fileName()
Returns the value of the
fileName
record component.final int
hashCode()
Returns a hash code value for this object.
final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
UploadMetadata
Creates an instance of a
UploadMetadata
record class.Parameters:
fileName
- the value for thefileName
record componentcontentType
- the value for thecontentType
record componentcontentLength
- the value for thecontentLength
record 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. Reference components are compared with
Objects::equals(Object,Object)
; primitive components are compared with '=='. -
fileName
Returns the value of the
fileName
record component.Returns:
the value of the
fileName
record component -
contentType
Returns the value of the
contentType
record component.Returns:
the value of the
contentType
record component -
contentLength
public long contentLength()Returns the value of the
contentLength
record component.Returns:
the value of the
contentLength
record component
-