gnu.crypto.keyring

Class Entry

Known Direct Subclasses:
EnvelopeEntry, PrimitiveEntry

public abstract class Entry
extends java.lang.Object

An immutable class representing a single entry in a keyring.

Version:
$Revision: 1.4.2.1 $

Field Summary

protected byte[]
payload
This entry's payload.
protected Properties
properties
This entry's property set.
protected int
type
This entry's type identifier.

Constructor Summary

Entry()
Default constructor for use by subclasses.
Entry(int type, Properties properties)
Creates a new Entry.

Method Summary

protected void
defaultDecode(DataInputStream in)
Generic decoding method, which simply decodes the properties field and reads the payload field.
void
encode(DataOutputStream out)
This method is called when this entry needs to be written to an output stream.
protected void
encodePayload()
This method is called of subclasses when the payload data needs to be created.
byte[]
getPayload()
Returns this entry's payload data, or null if
Properties
getProperties()
Returns this entry's properties object.

Field Details

payload

protected byte[] payload
This entry's payload.


properties

protected Properties properties
This entry's property set.


type

protected int type
This entry's type identifier.

Constructor Details

Entry

protected Entry()
Default constructor for use by subclasses.


Entry

protected Entry(int type,
                Properties properties)
Creates a new Entry.

Parameters:
type - This entry's type.
properties - This entry's properties.

Method Details

defaultDecode

protected void defaultDecode(DataInputStream in)
            throws IOException
Generic decoding method, which simply decodes the properties field and reads the payload field.

Parameters:
in - The input data stream.


encode

public void encode(DataOutputStream out)
            throws IOException
This method is called when this entry needs to be written to an output stream.

Parameters:
out - The stream to write to.


encodePayload

protected void encodePayload()
            throws IOException
This method is called of subclasses when the payload data needs to be created.


getPayload

public byte[] getPayload()
Returns this entry's payload data, or null if


getProperties

public Properties getProperties()
Returns this entry's properties object. The properties are cloned before being returned.

Returns:
The properties.


Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.