Class FileStream

java.lang.Object
com.langfuse.client.core.FileStream

public class FileStream extends Object
Represents a file stream with associated metadata for file uploads.
  • 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

      public FileStream(InputStream inputStream)
  • Method Details

    • getInputStream

      public InputStream getInputStream()
    • getFileName

      @Nullable public String 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.