Record Class UploadVerifier.Result
java.lang.Object
java.lang.Record
com.iizix.server.upload.UploadVerifier.Result
- Record Components:
reason- The failure reason, or null on success.verifiedType- The sniffed type, empty if not sniffable; only meaningful on success.measuredSize- The decoded size; only meaningful on success.
- Enclosing class:
UploadVerifier
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisOK()Checks if the verification succeeded.longReturns the value of themeasuredSizerecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theverifiedTyperecord component.
Constructor Details
Result
Creates an instance of aResultrecord class.- Parameters:
reason- the value for thereasonrecord componentverifiedType- the value for theverifiedTyperecord componentmeasuredSize- the value for themeasuredSizerecord component
Method Details
isOK
public boolean isOK()Checks if the verification succeeded.- Returns:
- true if there is no failure reason.
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.reason
verifiedType
Returns the value of theverifiedTyperecord component.- Returns:
- the value of the
verifiedTyperecord component
measuredSize
public long measuredSize()Returns the value of themeasuredSizerecord component.- Returns:
- the value of the
measuredSizerecord component