|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nhindirect.xd.common.DirectDocument2
public class DirectDocument2
Abstract representation of a document with supporting metadata. TODO: This replace DirectDocument with this class.. wanted to wait to avoid any merge conflicts for ongoing XD* work.
| Nested Class Summary | |
|---|---|
static class |
DirectDocument2.Metadata
Abstract representation of document metadata. |
| Constructor Summary | |
|---|---|
DirectDocument2()
Default document constructor. |
|
DirectDocument2(File file)
|
|
| Method Summary | |
|---|---|
byte[] |
getData()
Get the value of data. |
DirectDocument2.Metadata |
getMetadata()
Get the value of metadata. |
static String |
getSha1Hash(byte[] bytes)
Calculate the SHA-1 hash for the provided array of bytes. |
static String |
getSha1Hash(String string)
Calculate the SHA-1 hash for the provided string. |
void |
setData(byte[] data)
Set the value of data. |
void |
setMetadata(DirectDocument2.Metadata metadata)
Set the value of metadata. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectDocument2()
public DirectDocument2(File file)
throws IOException
file -
IOException| Method Detail |
|---|
public DirectDocument2.Metadata getMetadata()
public void setMetadata(DirectDocument2.Metadata metadata)
metadata - The metadata to set.public byte[] getData()
public void setData(byte[] data)
data - The data to set;public static String getSha1Hash(byte[] bytes)
bytes - Bytes from which to calculate the SHA-1 hash.
public static String getSha1Hash(String string)
string - The string from which to calculate the SHA-1 hash.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||