Record Class InputFileDTO
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.core.dto.InputFileDTO
- Record Components:
mediaStream- the input stream of the media filefileName- the name of the file
- All Implemented Interfaces:
Closeable, AutoCloseable
public record InputFileDTO(InputStream mediaStream, String fileName)
extends Record
implements Closeable
Data Transfer Object representing an input file with a media stream and file name.
-
Constructor Summary
ConstructorsConstructorDescriptionInputFileDTO(InputStream mediaStream, String fileName) Creates an instance of aInputFileDTOrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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 themediaStreamrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InputFileDTO
Creates an instance of aInputFileDTOrecord class.- Parameters:
mediaStream- the value for themediaStreamrecord componentfileName- the value for thefileNamerecord component
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
mediaStream
Returns the value of themediaStreamrecord component.- Returns:
- the value of the
mediaStreamrecord component
-
fileName
-