Package com.vaadin.server
Class ExternalResource
- java.lang.Object
-
- com.vaadin.server.ExternalResource
-
- All Implemented Interfaces:
Resource
,Serializable
public class ExternalResource extends Object implements Resource, Serializable
ExternalResource
implements source for resources fetched from location specified by URL:s. The resources are fetched directly by the client terminal and are not fetched trough the terminal adapter.- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExternalResource(String sourceURL)
Creates a new download component for downloading directly from given URL.ExternalResource(String sourceURL, String mimeType)
Creates a new download component for downloading directly from given URL.ExternalResource(URL sourceURL)
Creates a new download component for downloading directly from given URL.ExternalResource(URL sourceURL, String mimeType)
Creates a new download component for downloading directly from given URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMIMEType()
Gets the MIME type of the resource.String
getURL()
Gets the URL of the external resource.void
setMIMEType(String mimeType)
Sets the MIME type of the resource.
-
-
-
Constructor Detail
-
ExternalResource
public ExternalResource(URL sourceURL)
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL
- the source URL.
-
ExternalResource
public ExternalResource(URL sourceURL, String mimeType)
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL
- the source URL.mimeType
- the MIME Type
-
ExternalResource
public ExternalResource(String sourceURL)
Creates a new download component for downloading directly from given URL.- Parameters:
sourceURL
- the source URL.
-
-
Method Detail
-
getURL
public String getURL()
Gets the URL of the external resource.- Returns:
- the URL of the external resource.
-
getMIMEType
public String getMIMEType()
Gets the MIME type of the resource.- Specified by:
getMIMEType
in interfaceResource
- Returns:
- the MIME type of the resource.
- See Also:
Resource.getMIMEType()
-
setMIMEType
public void setMIMEType(String mimeType)
Sets the MIME type of the resource.
-
-