|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--webfunds.sox.Encodable
|
+--webfunds.sox.Id
This class represents an identifer, which can refer to an object by means of a hash or similar. This is a pseudo abstract class for other identifier classes.
| Field Summary | |
protected byte[] |
id
The item identifier. |
protected static int |
LEN_MD5
|
protected static int |
LEN_NAH
|
protected static int |
LEN_SHA1
|
protected static int |
MD_MD5
SOX2 format for these hashes is the OpenPGP format with leading byte. |
protected static int |
MD_NAH
SOX2 format for these hashes is the OpenPGP format with leading byte. |
protected static int |
MD_SHA1
SOX2 format for these hashes is the OpenPGP format with leading byte. |
| Constructor Summary | |
protected |
Id()
|
protected |
Id(byte[] data)
|
protected |
Id(java.io.InputStream is)
|
| Method Summary | |
void |
decode(java.io.InputStream is)
|
void |
encode(java.io.OutputStream os)
|
protected boolean |
eq(Id other)
|
protected static Id |
ex()
Make and return an example Id for testing (other classes). |
protected static Id |
ex(int len)
|
java.lang.String |
fp()
fingerprint - a quick function for diags, long enough to avoid collisions, but short enough to print out. |
byte[] |
getByteArray()
Get the underlying byte[]. |
static byte[] |
getBytesFromIdString(java.lang.String s)
Convert this string representation into the bytes. |
int |
getOpenPGPId()
Assumes length of the hash array will determine. |
int |
hashCode()
|
static void |
main(java.lang.String[] args)
|
void |
setByteArray(byte[] byteArray)
Set the underlying byte[]. |
void |
setOpenPGPId(int i)
|
java.lang.String |
toString()
Convert this object to a string. |
| Methods inherited from class webfunds.sox.Encodable |
decode,
encode,
readByteArray,
readCertificate,
readProperties,
readString,
writeByteArray,
writeCertificate,
writeProperties,
writeString |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected byte[] id
protected static final int MD_MD5
protected static final int MD_SHA1
protected static final int MD_NAH
protected static final int LEN_MD5
protected static final int LEN_SHA1
protected static final int LEN_NAH
| Constructor Detail |
protected Id()
protected Id(byte[] data)
throws SOXPacketException
protected Id(java.io.InputStream is)
throws java.io.IOException,
SOXPacketException
| Method Detail |
public byte[] getByteArray()
public void setByteArray(byte[] byteArray)
public void setOpenPGPId(int i)
public int getOpenPGPId()
public void encode(java.io.OutputStream os)
throws java.io.IOException
public void decode(java.io.InputStream is)
throws java.io.IOException,
SOXPacketException
public int hashCode()
public static byte[] getBytesFromIdString(java.lang.String s)
public java.lang.String toString()
public java.lang.String fp()
protected boolean eq(Id other)
protected static Id ex()
protected static Id ex(int len)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||