Record Class FileItem
java.lang.Object
java.lang.Record
org.ninjax.core.FileItem
public record FileItem(String fileName, String contentType, long size, InputStream inputStream)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionFileItem(String fileName, String contentType, long size, InputStream inputStream) Creates an instance of aFileItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.Returns the value of theinputStreamrecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FileItem
Creates an instance of aFileItemrecord class.- Parameters:
fileName- the value for thefileNamerecord componentcontentType- the value for thecontentTyperecord componentsize- the value for thesizerecord componentinputStream- the value for theinputStreamrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
inputStream
Returns the value of theinputStreamrecord component.- Returns:
- the value of the
inputStreamrecord component
-