|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sdsi.SDSIObject
Class to represent SDSI objects. The many subclasses are useful for providing specific functionality inherent to individual types of objects.
Field Summary | |
protected Hash |
_hash
|
protected boolean |
_modified
|
protected SexpList |
srep
|
Constructor Summary | |
(package private) |
SDSIObject()
|
|
SDSIObject(SexpList s)
Creates a new SDSIObject from a SexpList. |
Method Summary | |
boolean |
equals(java.lang.Object object)
|
abstract java.lang.String |
getAbbreviation()
Returns a single or double letter abbreviation this SDSIObject. |
Hash |
getHash()
|
byte[] |
getHash(java.security.MessageDigest md)
Returns the hash of this SDSIObject. |
SexpList |
getSrep()
Returns the S-Expression of this SDSIObject in canonical form as a SexpList |
java.lang.String |
getType()
Returns a short string that represents the type of this SDSIObject. |
int |
hashCode()
|
static SDSIObject |
principalParse(SexpList l,
SDSIPrincipal p)
Generates the SDSI object that is represented by the SexpList in the argument. |
static SDSIObject |
readFrom(java.io.InputStream is)
Reads a SDSIObject from an input stream, assumes creating principal is null. |
static SDSIObject |
readFrom(java.io.InputStream is,
SDSIPrincipal p)
Reads a SDSIObject from an input stream |
boolean |
sameAs(java.lang.Object object)
|
void |
sign(java.security.Signature s)
Updates a signature with the canonical representation of this SDSIObject. |
java.lang.String |
toReadableString(int width)
Returns a string representing this SDSIObject encoded as an S-Expression. |
abstract java.lang.String |
toShortString()
Returns a short descriptive string representing this SDSIObject. |
java.lang.String |
toString()
Returns a string of this SDSIObject represented in canonical form. |
void |
writeCanonical(java.io.OutputStream os)
Writes this SDSIObject to an output stream in canonical form |
void |
writeReadable(java.io.OutputStream os)
Writes this SDSIObject to an output stream in readable form |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected SexpList srep
protected transient Hash _hash
protected transient boolean _modified
Constructor Detail |
SDSIObject()
public SDSIObject(SexpList s)
s
- the SexpList that represents the SDSIObject.Method Detail |
public Hash getHash() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public boolean sameAs(java.lang.Object object)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static SDSIObject readFrom(java.io.InputStream is, SDSIPrincipal p) throws java.io.IOException, SDSIException
is
- the input stream to read fromp
- the "creating principal" of the object
java.io.IOException
- error reading from stream
SDSIException
- error parsing objectpublic static SDSIObject readFrom(java.io.InputStream is) throws java.io.IOException, SDSIException
is
- the input stream to read from
java.io.IOException
- error reading from stream
SDSIException
- error parsing objectpublic void writeReadable(java.io.OutputStream os) throws java.io.IOException
os
- the output stream to write to
java.io.IOException
- error writing to streampublic void writeCanonical(java.io.OutputStream os) throws java.io.IOException
os
- the output stream to write to
java.io.IOException
- error writing to streampublic static SDSIObject principalParse(SexpList l, SDSIPrincipal p) throws SexpParseException
l
- the SexpLIst to be parsed.p
- the SDSIPrincipal that should be treated
as having created the object
SexpParseException
- if the SexpList cannot
be succesfully parsed into a SDSIObjectpublic abstract java.lang.String toShortString()
public abstract java.lang.String getAbbreviation()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toReadableString(int width)
width
- the maximum width of any line in the string.
public byte[] getHash(java.security.MessageDigest md)
md
- the MessageDigest to use for the hash, it will be reset.
public void sign(java.security.Signature s) throws java.security.SignatureException
s
- the signature to update.
java.security.SignatureException
- if the argument is not a properly
initialized Signature object.public java.lang.String getType()
public SexpList getSrep()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |