Package com.langfuse.client.core
Class FileStream
java.lang.Object
com.langfuse.client.core.FileStream
Represents a file stream with associated metadata for file uploads.
-
Constructor Summary
ConstructorsConstructorDescriptionFileStream(InputStream inputStream) FileStream(InputStream inputStream, String fileName, okhttp3.MediaType contentType) Constructs a FileStream with the given input stream and optional metadata. -
Method Summary
Modifier and TypeMethodDescriptionokhttp3.MediaTypeokhttp3.RequestBodyCreates a RequestBody suitable for use with OkHttp client.
-
Constructor Details
-
FileStream
public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable okhttp3.MediaType contentType) Constructs a FileStream with the given input stream and optional metadata.- Parameters:
inputStream- The input stream of the file content. Must not be null.fileName- The name of the file, or null if unknown.contentType- The MIME type of the file content, or null if unknown.- Throws:
NullPointerException- if inputStream is null
-
FileStream
-
-
Method Details
-
getInputStream
-
getFileName
-
getContentType
@Nullable public okhttp3.MediaType getContentType() -
toRequestBody
public okhttp3.RequestBody toRequestBody()Creates a RequestBody suitable for use with OkHttp client.- Returns:
- A RequestBody instance representing this file stream.
-