instead
. This class conflates the source of the data with the type of
response being sent. This assumes the file should be sent as an attachment while StreamedFile
does not.
The SystemFile
class now behaves the same as StreamedFile
by defaulting to inline with a method
to call to set it to be attached.
new AttachedFile(file, name) -> new SystemFile(file).attach(name)
new AttachedFile(file) -> new SystemFile(file).attach(file.getName())
@Deprecated public class AttachedFile extends SystemFileCustomizableResponseType
file
ATTACHMENT_HEADER
Constructor and Description |
---|
AttachedFile(File file)
Deprecated.
|
AttachedFile(File file,
String filename)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Deprecated.
|
AttachedFile |
inline()
Deprecated.
If called, the file will not be sent as an attachment.
|
void |
process(MutableHttpResponse response)
Deprecated.
Modify the response before it is written to the client.
|
getFile, getLastModified, getLength, getMediaType
public AttachedFile(File file)
file
- The filepublic AttachedFile inline()
public void process(MutableHttpResponse response)
CustomizableResponseType
response
- The response to modifypublic String getName()
getName
in interface FileCustomizableResponseType
getName
in class SystemFileCustomizableResponseType