Module io.jooby
Package io.jooby

Class InlineFile


public class InlineFile extends FileDownload
Represents an inline file response.
Since:
2.0.0
Author:
edgar
  • Constructor Details

    • InlineFile

      public InlineFile(@NonNull InputStream content, @NonNull String fileName, long fileSize)
      Creates a new inline file.
      Parameters:
      content - File content.
      fileName - Filename.
      fileSize - File size or -1 if unknown.
    • InlineFile

      public InlineFile(@NonNull InputStream content, @NonNull String fileName)
      Creates a new inline file.
      Parameters:
      content - File content.
      fileName - Filename.
    • InlineFile

      public InlineFile(@NonNull Path file, @NonNull String fileName) throws IOException
      Creates a new inline file.
      Parameters:
      file - File content.
      fileName - Filename.
      Throws:
      IOException - For IO exception while reading file.
    • InlineFile

      public InlineFile(@NonNull Path file) throws IOException
      Creates a new inline file.
      Parameters:
      file - File content.
      Throws:
      IOException - For IO exception while reading file.