Package com.enonic.xp.resource
Class MockResource
- java.lang.Object
-
- com.enonic.xp.resource.ResourceBase
-
- com.enonic.xp.resource.MockResource
-
- All Implemented Interfaces:
Resource
public class MockResource extends ResourceBase
-
-
Constructor Summary
Constructors Constructor Description MockResource(ResourceKey key, byte[] bytes, long timestamp)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MockResourceempty(ResourceKey key, long timestamp)booleanexists()ByteSourcegetBytes()StringgetResolverName()longgetSize()longgetTimestamp()URLgetUrl()static MockResourcemissing(ResourceKey key)-
Methods inherited from class com.enonic.xp.resource.ResourceBase
getKey, handleError, openReader, openStream, readBytes, readLines, readString, requireExists
-
-
-
-
Constructor Detail
-
MockResource
public MockResource(ResourceKey key, byte[] bytes, long timestamp)
-
-
Method Detail
-
missing
public static MockResource missing(ResourceKey key)
-
empty
public static MockResource empty(ResourceKey key, long timestamp)
-
getUrl
public URL getUrl()
-
exists
public boolean exists()
-
getSize
public long getSize()
-
getTimestamp
public long getTimestamp()
-
getBytes
public ByteSource getBytes()
-
getResolverName
public String getResolverName()
-
-