org.apache.wicket.util.resource
Class UrlResourceStream
java.lang.Object
org.apache.wicket.util.resource.AbstractResourceStream
org.apache.wicket.util.resource.UrlResourceStream
- All Implemented Interfaces:
- Closeable, Serializable, IClusterable, IFixedLocationResourceStream, IResourceStream, IModifiable
public class UrlResourceStream
- extends AbstractResourceStream
- implements IFixedLocationResourceStream
UrlResourceStream implements IResource for URLs.
- Author:
- Jonathan Locke, Igor Vaynberg
- See Also:
IResourceStream
,
IModifiable
,
Serialized Form
UrlResourceStream
public UrlResourceStream(URL url)
- Construct.
- Parameters:
url
- URL of resource
close
public void close()
throws IOException
- Closes this resource.
- Specified by:
close
in interface Closeable
- Specified by:
close
in interface IResourceStream
- Throws:
IOException
getInputStream
public InputStream getInputStream()
throws ResourceStreamNotFoundException
- Specified by:
getInputStream
in interface IResourceStream
- Returns:
- A readable input stream for this resource.
- Throws:
ResourceStreamNotFoundException
getURL
public URL getURL()
- Returns:
- The URL to this resource (if any)
lastModifiedTime
public Time lastModifiedTime()
- Specified by:
lastModifiedTime
in interface IModifiable
- Overrides:
lastModifiedTime
in class AbstractResourceStream
- Returns:
- The last time this resource was modified
- See Also:
IModifiable.lastModifiedTime()
toString
public String toString()
- Overrides:
toString
in class Object
getContentType
public String getContentType()
- Specified by:
getContentType
in interface IResourceStream
- Overrides:
getContentType
in class AbstractResourceStream
- Returns:
- The content type of this resource, such as "image/jpeg" or "text/html"
length
public Bytes length()
- Specified by:
length
in interface IResourceStream
- Overrides:
length
in class AbstractResourceStream
locationAsString
public String locationAsString()
- Specified by:
locationAsString
in interface IFixedLocationResourceStream
Copyright © 2006–2015 Apache Software Foundation. All rights reserved.