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 device
mimeType - the mime type parsed from the file name
contentLenght - the length of the file in bytes
folderPath - the full path and filename within the dropped folder, if available (only when a folder is dropped or UploadFileHandler.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.
Author:
mstahv
  • Constructor Details

    • FileDetails

      public FileDetails(String fileName, String mimeType, long contentLenght, String folderPath)
      Creates an instance of a FileDetails record class.
      Parameters:
      fileName - the value for the fileName record component
      mimeType - the value for the mimeType record component
      contentLenght - the value for the contentLenght record component
      folderPath - the value for the folderPath record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fileName

      public String fileName()
      Returns the value of the fileName record component.
      Returns:
      the value of the fileName record component
    • mimeType

      public String mimeType()
      Returns the value of the mimeType record component.
      Returns:
      the value of the mimeType record component
    • contentLenght

      public long contentLenght()
      Returns the value of the contentLenght record component.
      Returns:
      the value of the contentLenght record component
    • folderPath

      public String folderPath()
      Returns the value of the folderPath record component.
      Returns:
      the value of the folderPath record component