Package com.vaadin.flow.server.streams
Enum Class DownloadDisposition
- All Implemented Interfaces:
Serializable,Comparable<DownloadDisposition>,Constable
Whether the browser should show downloaded content or save it as a file, as
sent in the
Content-Disposition header.
Whether content is shown or saved depends on where it is used, not on what it
is: the same PDF can be shown in a new browser tab and saved from a download
link. The place that registers a DownloadHandler, such as a component
that shows an image, sets the disposition on the registered resource. A
handler that gives only a file name, with
DownloadEvent.fileName(String) as the built-in handlers do, is then
served with that type. A handler that asks for a type itself, with
DownloadEvent.attachment(String) or
DownloadEvent.inline(String), keeps its choice.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe browser saves the content as a file.The browser shows the content, for example as an image, in an iframe or in a new tab. -
Method Summary
Modifier and TypeMethodDescriptionstatic DownloadDispositionReturns the enum constant of this class with the specified name.static DownloadDisposition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INLINE
The browser shows the content, for example as an image, in an iframe or in a new tab. -
ATTACHMENT
The browser saves the content as a file.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-