org.imemex.idm
Class AbstractContent
java.lang.Object
org.imemex.idm.AbstractContent
- All Implemented Interfaces:
- Content, Hashable
- Direct Known Subclasses:
- DefaultContent
public abstract class AbstractContent
- extends java.lang.Object
- implements Content
Abstract implementation of the content interface. Provides a read-only
content with MD5 hash.
- Author:
- marcos
|
Method Summary |
java.io.OutputStream |
getOutputStream()
gets an output stream that writes to the content of an resource view |
long |
getSizeEstimate()
Obtains the estimated size of the content. |
java.lang.String |
md5()
default implementation consumes the input streamt to compute an md5 hash
value |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AbstractContent
public AbstractContent()
getOutputStream
public java.io.OutputStream getOutputStream()
- Description copied from interface:
Content
- gets an output stream that writes to the content of an resource view
- Specified by:
getOutputStream in interface Content
- Returns:
- write content-access as OutputStream
getSizeEstimate
public long getSizeEstimate()
- Description copied from interface:
Content
- Obtains the estimated size of the content.
- Specified by:
getSizeEstimate in interface Content
- Returns:
- the estimated size of the content.
md5
public java.lang.String md5()
- default implementation consumes the input streamt to compute an md5 hash
value
- Specified by:
md5 in interface Hashable
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object