Cryptix OpenPGP

cryptix.openpgp
Class PGPArmouredMessage

java.lang.Object
  extended bycryptix.message.Message
      extended bycryptix.openpgp.PGPArmouredMessage

public class PGPArmouredMessage
extends Message

Represents an armoured message.

Version:
$Revision: 1.5 $
Author:
Edwin Woudt

Constructor Summary
PGPArmouredMessage(KeyBundle bundle)
          Creates an ArmouredMessage from a KeyBundle
PGPArmouredMessage(Message msg)
          Creates an ArmouredMessage from another Message
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Get a format specific attribute.
 java.lang.Object getContents()
          Returns the contents of this message.
 byte[] getEncoded()
          Returns the message in encoded format.
 java.lang.String getEncodedString()
          Returns the message in encoded format.
 
Methods inherited from class cryptix.message.Message
equals, getFormat, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PGPArmouredMessage

public PGPArmouredMessage(Message msg)
Creates an ArmouredMessage from another Message


PGPArmouredMessage

public PGPArmouredMessage(KeyBundle bundle)
Creates an ArmouredMessage from a KeyBundle

Method Detail

getEncoded

public byte[] getEncoded()
                  throws MessageException
Returns the message in encoded format.

Specified by:
getEncoded in class Message
Throws:
MessageException - on a variety of format specific problems.

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws java.lang.IllegalArgumentException,
                                     MessageException
Get a format specific attribute.

Specified by:
getAttribute in class Message
Parameters:
name - a name identifying the attribute
Returns:
the attribute or null if the attribute isn't set.
Throws:
java.lang.IllegalArgumentException - if the attribute is not supported on this format. (Note: if an attribute is supported but not set, then this method should return null instead of throwing this exception.)
MessageException - on a variety of format specific problems.

getEncodedString

public java.lang.String getEncodedString()
                                  throws MessageException
Returns the message in encoded format.

Throws:
MessageException - on a variety of format specific problems.

getContents

public java.lang.Object getContents()
Returns the contents of this message.

Returns:
either a Message or a KeyBundle

Cryptix OpenPGP

Copyright (C) 1999-2003 The Cryptix Foundation Ltd.