|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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 ResourceIOExceptionpublic InputStream getInputStream()
getInputStream in interface ResourceWithInputStreamprotected void setInputStream(InputStream inputStream)
protected void setLength(long length)
public void release()
Resource
release in interface Resourcepublic long getLastModified()
Resource
getLastModified in interface Resourcepublic void setLastModified(long lastModificationDate)
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||