Record Class UploadFileHandler.FileDetails
java.lang.Object
java.lang.Record
org.vaadin.firitin.components.upload.UploadFileHandler.FileDetails
- Record Components:
fileName- the name of the file in users devicemimeType- the mime type parsed from the file namecontentLenght- the length of the file in bytesfolderPath- the full path and filename within the dropped folder, if available (only when a folder is dropped orUploadFileHandler.chooseFolders()is used). The path starts with a slash and is relative to the dropped folder.
- Enclosing class:
UploadFileHandler
public static record UploadFileHandler.FileDetails(String fileName, String mimeType, long contentLenght, String folderPath)
extends Record
A collection of metadata about the uploaded files.
-
Constructor Summary
ConstructorsConstructorDescriptionFileDetails(String fileName, String mimeType, long contentLenght, String folderPath) Creates an instance of aFileDetailsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecontentLenghtrecord component.final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.Returns the value of thefolderPathrecord component.final inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FileDetails
Creates an instance of aFileDetailsrecord class.- Parameters:
fileName- the value for thefileNamerecord componentmimeType- the value for themimeTyperecord componentcontentLenght- the value for thecontentLenghtrecord componentfolderPath- the value for thefolderPathrecord 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
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-
contentLenght
public long contentLenght()Returns the value of thecontentLenghtrecord component.- Returns:
- the value of the
contentLenghtrecord component
-
folderPath
Returns the value of thefolderPathrecord component.- Returns:
- the value of the
folderPathrecord component
-