We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.terminal.
Class ExternalResource
java.lang.Object
com.vaadin.terminal.ExternalResource
All Implemented Interfaces:
- extends Object
- implements Resource, Serializable
public class ExternalResource
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
Version:
6.8.18
Author:
Vaadin Ltd.
See Also:
Constructor Summary | |
---|---|
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 | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ExternalResource
public ExternalResource(URL sourceURL)
- Parameters:
sourceURL
- the source URL.
Creates a new download component for downloading directly from given URL.
ExternalResource
public ExternalResource(URL sourceURL,
String mimeType)
- Parameters:
sourceURL
- the source URL.mimeType
- the MIME Type
Creates a new download component for downloading directly from given URL.
ExternalResource
public ExternalResource(String sourceURL)
- Parameters:
sourceURL
- the source URL.
Creates a new download component for downloading directly from given URL.
ExternalResource
public ExternalResource(String sourceURL,
String mimeType)
- Parameters:
sourceURL
- the source URL.mimeType
- the MIME Type
Creates a new download component for downloading directly from given URL.
Method Detail |
---|
getURL
public String getURL()
- Returns:
- the URL of the external resource.
Gets the URL of the external resource.
getMIMEType
public String getMIMEType()
- Specified by:
getMIMEType
in interfaceResource
- Returns:
- the MIME type of the resource.
- See Also:
Resource.getMIMEType()
Gets the MIME type of the resource.
setMIMEType
public void setMIMEType(String mimeType)
Sets the MIME type of the resource.