org.apache.wicket.resource
Class DynamicByteArrayResource.ResourceState

java.lang.Object
  extended by org.apache.wicket.resource.DynamicByteArrayResource.ResourceState
Enclosing class:
DynamicByteArrayResource

public static class DynamicByteArrayResource.ResourceState
extends Object

This is a ResourceState subclasses should return in the getResourceState method. This resource state should be thread safe. So it shouldn't be altered after construction. Even with synchronize blocks this is still not safe because the call getContentType() can not be sync together with the call getData() they will happen after each other.

Author:
jcompagner

Constructor Summary
DynamicByteArrayResource.ResourceState()
           
 
Method Summary
 String getContentType()
           
 byte[] getData()
           
 int getLength()
           
 Time lastModifiedTime()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicByteArrayResource.ResourceState

public DynamicByteArrayResource.ResourceState()
Method Detail

getData

public byte[] getData()
Returns:
The Byte array for this resource

getContentType

public String getContentType()
Returns:
The content type of this resource

lastModifiedTime

public Time lastModifiedTime()
Returns:
The last modified time of this resource

getLength

public int getLength()
Returns:
The length of the data


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