gnu.crypto.keyring
Class BinaryDataEntry
java.lang.Object
gnu.crypto.keyring.Entry
gnu.crypto.keyring.PrimitiveEntry
gnu.crypto.keyring.BinaryDataEntry
- public class BinaryDataEntry
- extends PrimitiveEntry
A binary data entry is a primitive entry that simply contains some amount
of arbitrary binary data and an optional content type.
$Revision: 1.2 $
Field Summary |
static int |
TYPE
|
Constructor Summary |
BinaryDataEntry(java.lang.String contentType,
byte[] data,
java.util.Date creationDate,
Properties properties)
Creates a new binary data entry. |
Method Summary |
static BinaryDataEntry |
decode(java.io.DataInputStream in)
|
protected void |
encodePayload()
This method is called of subclasses when the payload data needs to be
created. |
java.lang.String |
getContentType()
Returns the content type of this entry, or null if this
property is not set. |
byte[] |
getData()
Returns this object's data field. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
public static final int TYPE
- See Also:
- Constant Field Values
BinaryDataEntry
public BinaryDataEntry(java.lang.String contentType,
byte[] data,
java.util.Date creationDate,
Properties properties)
- Creates a new binary data entry.
- Parameters:
contentType
- The content type of this entry. This parameter can
be null
if no content type is needed.data
- The data.creationDate
- The creation date.properties
- This entry's properties.
decode
public static BinaryDataEntry decode(java.io.DataInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
getContentType
public java.lang.String getContentType()
- Returns the content type of this entry, or
null
if this
property is not set.
- Returns:
- The content type.
getData
public byte[] getData()
- Returns this object's data field.
- Returns:
- The data.
encodePayload
protected void encodePayload()
- Description copied from class:
Entry
- This method is called of subclasses when the payload data needs to be
created.
- Specified by:
encodePayload
in class Entry
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.