wicket.util.resource
Class AbstractStringResourceStream

java.lang.Object
  extended bywicket.util.resource.AbstractResourceStream
      extended bywicket.util.resource.AbstractStringResourceStream
All Implemented Interfaces:
IModifiable, IResourceStream, IStringResourceStream, java.io.Serializable
Direct Known Subclasses:
StringBufferResourceStream, StringResourceStream

public abstract class AbstractStringResourceStream
extends AbstractResourceStream

Base class for string resources.

Author:
Jonathan Locke
See Also:
Serialized Form

Constructor Summary
AbstractStringResourceStream()
          Constructor.
AbstractStringResourceStream(java.lang.String contentType)
          Constructor.
 
Method Summary
 void close()
          Closes the resource.
 java.lang.String getContentType()
          Gets the mime type of this resource
 java.io.InputStream getInputStream()
          Gets the resource stream.
protected abstract  java.lang.String getString()
           
 Time lastModifiedTime()
          Gets the last time this modifiable thing changed.
 void setLastModified(Time lastModified)
           
 
Methods inherited from class wicket.util.resource.AbstractResourceStream
asString, getCharset, getLocale, setCharset, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wicket.util.resource.IResourceStream
length
 

Constructor Detail

AbstractStringResourceStream

public AbstractStringResourceStream()
Constructor.


AbstractStringResourceStream

public AbstractStringResourceStream(java.lang.String contentType)
Constructor.

Parameters:
contentType - The mime type of this resource, such as "image/jpeg" or "text/html"
Method Detail

close

public void close()
           throws java.io.IOException
Description copied from interface: IResourceStream
Closes the resource. Normally, this includes closing any underlying input stream returned by getInputStream().

Throws:
java.io.IOException
See Also:
IResourceStream.close()

getContentType

public java.lang.String getContentType()
Description copied from interface: IResourceStream
Gets the mime type of this resource

Returns:
The mime type of this resource, such as "image/jpeg" or "text/html"
See Also:
IResourceStream.getContentType()

getInputStream

public java.io.InputStream getInputStream()
                                   throws ResourceStreamNotFoundException
Description copied from interface: IResourceStream
Gets the resource stream. You should not directly close this stream. Instead call the close() method on IResourceStream.

Returns:
Returns the inputStream.
Throws:
ResourceStreamNotFoundException
See Also:
IResourceStream.getInputStream()

lastModifiedTime

public Time lastModifiedTime()
Description copied from interface: IModifiable
Gets the last time this modifiable thing changed.

Returns:
The last modification time.
See Also:
IModifiable.lastModifiedTime()

setLastModified

public void setLastModified(Time lastModified)
Parameters:
lastModified - The lastModified to set.

getString

protected abstract java.lang.String getString()
Returns:
The string resource


Copyright © 2004-2006 Wicket developers. All Rights Reserved.