|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.kernel.ac.TOCSerialiser
public class TOCSerialiser
This class serialises a TOC in accordance with the AOS kernel's encoding rules. It makes use of the XDR definitions of the TOC and the TOC entry.
| Field Summary | |
|---|---|
static int |
SERIALISED_ENTRY_SIZE
The number of additional bytes required for serialising a TOC entry. |
static int |
SERIALISED_OVERHEAD
The number of bytes required for serialising a TOC of 0 entries. |
| Constructor Summary | |
|---|---|
TOCSerialiser()
Constructs a TOCSerialiser with zero entries. |
|
| Method Summary | |
|---|---|
void |
addNonSpecialTOCEntry(TOCEntry entry,
byte[] digest)
Adds a TOC entry to the current set of TOC entries. |
void |
addSpecialTOCEntry(TOCEntry entry)
|
void |
done(boolean sign,
java.security.PrivateKey privateKey)
Called when all TOC entries have been added. |
byte[] |
getSerialised()
Returns the buffer holding serialised TOC. |
int |
getSerialisedLength()
Returns the length of the serialised TOC. |
byte[] |
getSignature()
Returns the signature over the TOC. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SERIALISED_OVERHEAD
public static final int SERIALISED_ENTRY_SIZE
| Constructor Detail |
|---|
public TOCSerialiser()
| Method Detail |
|---|
public void addNonSpecialTOCEntry(TOCEntry entry,
byte[] digest)
public void addSpecialTOCEntry(TOCEntry entry)
public void done(boolean sign,
java.security.PrivateKey privateKey)
throws java.io.IOException
sign - whether to sign or not (performance measurements)privateKey - the private key to use for signing
java.io.IOException - if a serialisation error occurredpublic byte[] getSerialised()
public int getSerialisedLength()
public byte[] getSignature()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||