public class AttachedFile extends FileDownload
FileDownload.Builder, FileDownload.Mode
Constructor and Description |
---|
AttachedFile(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.
|
build, build, build, build, build, getContentDisposition, getContentType, getFileName, getFileSize, stream, toString
public AttachedFile(@Nonnull InputStream content, @Nonnull String fileName, long fileSize)
content
- File content.fileName
- Filename.fileSize
- File size or -1
if unknown.public AttachedFile(@Nonnull InputStream content, @Nonnull String fileName)
content
- File content.fileName
- Filename.public AttachedFile(@Nonnull Path file, @Nonnull String fileName) throws IOException
file
- File content.fileName
- Filename.IOException
- For IO exception while reading file.public AttachedFile(@Nonnull Path file) throws IOException
file
- File content.IOException
- For IO exception while reading file.Copyright © 2022. All rights reserved.