java.lang.Object
io.jooby.FileDownload
io.jooby.AttachedFile
Represents a file attachment response.
- Since:
- 2.0.0
- Author:
- edgar
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jooby.FileDownload
FileDownload.Builder, FileDownload.Mode
-
Constructor Summary
ConstructorDescriptionAttachedFile
(InputStream content, String fileName) Creates a new file attachment.AttachedFile
(InputStream content, String fileName, long fileSize) Creates a new file attachment.AttachedFile
(Path file) Creates a new file attachment.AttachedFile
(Path file, String fileName) Creates a new file attachment. -
Method Summary
Methods inherited from class io.jooby.FileDownload
build, build, build, build, build, getContentDisposition, getContentType, getFileName, getFileSize, stream, toString
-
Constructor Details
-
AttachedFile
Creates a new file attachment.- Parameters:
content
- File content.fileName
- Filename.fileSize
- File size or-1
if unknown.
-
AttachedFile
Creates a new file attachment.- Parameters:
content
- File content.fileName
- Filename.
-
AttachedFile
Creates a new file attachment.- Parameters:
file
- File content.fileName
- Filename.- Throws:
IOException
- For IO exception while reading file.
-
AttachedFile
Creates a new file attachment.- Parameters:
file
- File content.- Throws:
IOException
- For IO exception while reading file.
-