Package com.vaadin.flow.server.streams
Record Class UploadMetadata
java.lang.Object
java.lang.Record
com.vaadin.flow.server.streams.UploadMetadata
public record UploadMetadata(String fileName, String contentType, long contentLength)
extends Record
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 aUploadMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecontentLengthrecord component.Returns the value of thecontentTyperecord 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.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UploadMetadata
Creates an instance of aUploadMetadatarecord class.- Parameters:
fileName- the value for thefileNamerecord componentcontentType- the value for thecontentTyperecord componentcontentLength- the value for thecontentLengthrecord 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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
contentLength
public long contentLength()Returns the value of thecontentLengthrecord component.- Returns:
- the value of the
contentLengthrecord component
-