Package io.meeds.mcp.server.tool.util
Record Class UploadToolUtils.FetchedContent
java.lang.Object
java.lang.Record
io.meeds.mcp.server.tool.util.UploadToolUtils.FetchedContent
- Enclosing class:
UploadToolUtils
public static record UploadToolUtils.FetchedContent(byte[] bytes, String mimeType, String fileName)
extends Record
A downloaded image: its bytes, resolved mime type and a file name.
-
Constructor Summary
ConstructorsConstructorDescriptionFetchedContent(byte[] bytes, String mimeType, String fileName) Creates an instance of aFetchedContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.inthashCode()Returns a hash code value for this object.mimeType()Returns the value of themimeTyperecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
FetchedContent
Creates an instance of aFetchedContentrecord class.- Parameters:
bytes- the value for thebytesrecord componentmimeType- the value for themimeTyperecord componentfileName- the value for thefileNamerecord component
-
-
Method Details
-
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). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-
mimeType
Returns the value of themimeTyperecord component.- Returns:
- the value of the
mimeTyperecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-