|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.krecan.m2_proxy.resource.AbstractResource net.krecan.m2_proxy.resource.DefaultResource
public class DefaultResource
Default resource implementantion. Wraps input stream.
Constructor Summary | |
---|---|
DefaultResource(String logicalName,
long lastModified,
long length,
InputStream inputStream)
|
Method Summary | |
---|---|
void |
copyToStream(OutputStream outputStream)
Copies the resource to the output stream. |
boolean |
equals(Object obj)
|
InputStream |
getInputStream()
|
long |
getLastModified()
Returns last modification date. |
long |
getLength()
Returns length of the resource |
int |
hashCode()
|
void |
release()
Releases all system resources blocked by this resource :-) It HAS to be called after using the resource. |
protected void |
setInputStream(InputStream inputStream)
|
void |
setLastModified(long lastModificationDate)
|
protected void |
setLength(long length)
|
String |
toString()
|
Methods inherited from class net.krecan.m2_proxy.resource.AbstractResource |
---|
finalize, getLogicalName, isReleased, setLogicalName, setReleased |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.krecan.m2_proxy.Resource |
---|
getLogicalName |
Constructor Detail |
---|
public DefaultResource(String logicalName, long lastModified, long length, InputStream inputStream)
Method Detail |
---|
public long getLength()
Resource
getLength
in interface Resource
public void copyToStream(OutputStream outputStream) throws IOException
Resource
copyToStream
in interface Resource
IOException
public InputStream getInputStream()
getInputStream
in interface ResourceWithInputStream
protected void setInputStream(InputStream inputStream)
protected void setLength(long length)
public void release()
Resource
release
in interface Resource
public long getLastModified()
Resource
getLastModified
in interface Resource
public void setLastModified(long lastModificationDate)
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |