org.apache.wicket.markup.html
Class JavascriptPackageResource.FilteringResourceStream

java.lang.Object
  extended by org.apache.wicket.markup.html.JavascriptPackageResource.FilteringResourceStream
All Implemented Interfaces:
Closeable, Serializable, IClusterable, IResourceStream, IModifiable
Enclosing class:
JavascriptPackageResource

protected abstract class JavascriptPackageResource.FilteringResourceStream
extends Object
implements IResourceStream

Resource Stream that caches the stripped content.

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
protected JavascriptPackageResource.FilteringResourceStream()
           
 
Method Summary
 void close()
          Closes the resource.
protected abstract  byte[] filterContent(byte[] input)
           
 String getContentType()
          Gets the mime type of this resource
 InputStream getInputStream()
          Gets the resource stream.
 Locale getLocale()
           
protected abstract  IResourceStream getOriginalResourceStream()
           
 Time lastModifiedTime()
          Gets the last time this modifiable thing changed.
 long length()
          Gets the size of this resource in bytes TODO 1.5: rename to lengthInBytes() or let it return some sort of size object
 void setLocale(Locale locale)
          This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JavascriptPackageResource.FilteringResourceStream

protected JavascriptPackageResource.FilteringResourceStream()
Method Detail

close

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

Specified by:
close in interface Closeable
Specified by:
close in interface IResourceStream
Throws:
IOException
See Also:
IResourceStream.close()

getContentType

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

Specified by:
getContentType in interface IResourceStream
Returns:
The mime type of this resource, such as "image/jpeg" or "text/html". Return null to let ResourceStreamRequestTarget handle the Content-Type automatically
See Also:
IResourceStream.getContentType()

getInputStream

public 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.

Specified by:
getInputStream in interface IResourceStream
Returns:
Returns the inputStream.
Throws:
ResourceStreamNotFoundException
See Also:
IResourceStream.getInputStream()

getLocale

public Locale getLocale()
Specified by:
getLocale in interface IResourceStream
Returns:
The Locale where this stream did resolve to
See Also:
IResourceStream.getLocale()

lastModifiedTime

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

Specified by:
lastModifiedTime in interface IModifiable
Returns:
the last modification Time
See Also:
IModifiable.lastModifiedTime()

length

public long length()
Description copied from interface: IResourceStream
Gets the size of this resource in bytes TODO 1.5: rename to lengthInBytes() or let it return some sort of size object

Specified by:
length in interface IResourceStream
Returns:
The size of this resource in the number of bytes, or -1 if unknown
See Also:
IResourceStream.length()

setLocale

public void setLocale(Locale locale)
Description copied from interface: IResourceStream
This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale.

Specified by:
setLocale in interface IResourceStream
Parameters:
locale - The Locale where this stream did resolve to.
See Also:
IResourceStream.setLocale(java.util.Locale)

toString

public String toString()
Overrides:
toString in class Object

filterContent

protected abstract byte[] filterContent(byte[] input)

getOriginalResourceStream

protected abstract IResourceStream getOriginalResourceStream()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.