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.booleanCompares by content: the bytes are an array.fileName()Returns the value of thefileNamerecord component.inthashCode()Hashes by content, the bytes included.mimeType()Returns the value of themimeTyperecord component.toString()Describes the content by its size, type and name, never its bytes.
-
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
Compares by content: the bytes are an array. -
hashCode
public int hashCode()Hashes by content, the bytes included. -
toString
Describes the content by its size, type and name, never its bytes. -
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
-