|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.id.ID | +--net.jxta.codat.CodatID
This class represents a CodatID. Codats are JXTA objects that can hold both data or code.
Codats are containers objects that are used to hold any kinds of objects or data. A codat can represent a file, a class file, the saved state of an application, a loadable C library. Codats are handled transparently by the JXTA platform, and are used as placeholders for any type of data. Codats hold Document that represent the data that they hold.
A CodatID is formed by the conjuction of a PeerGroup unique ID and the Codat Document hash value.The Id is the unique Id for this Codat within the JXTA world. Some codats may not hold a document. In that case a codatId is constructed without the document hash value.
Codat
,
Document
,
StructuredDocument
Field Summary | |
static CodatID |
nullCodatID
The null CodatID. |
Fields inherited from class net.jxta.id.ID |
bytes,
flagCodatID,
flagID,
flagPeerGroupID,
flagPeerID,
flagPipeID,
flagsEncodingOffset,
flagsIdTypeOffset,
flagsOffset,
flagsSize,
IdByteArraySize,
nullID,
URIEncodingName,
UUIDEncoded |
Constructor Summary | |
CodatID()
Constructor used in the creation of a CodatID when no concrete Document is associated. |
|
CodatID(PeerGroupID groupID)
Creates a CodatID for a Codat without document. |
|
CodatID(PeerGroupID groupID,
Document document)
Constructor to create a new CodatID. |
|
CodatID(PeerGroupID groupID,
java.io.InputStream in)
Constructor. |
Method Summary | |
java.lang.Object |
clone()
Clones this CodatID |
boolean |
equals(java.lang.Object id)
Returns true if the two CodatIDs are same |
PeerGroupID |
getPeerGroupID()
Returns the PeerGroupID of the PeerGroup associated with this Codat |
boolean |
isStatic()
Returns true if the CodatID is associated with a static Codat. |
Methods inherited from class net.jxta.id.ID |
bytesIntoLong,
getURL,
hashCode,
isSamePeerGroup,
longIntoBytes,
toString |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final CodatID nullCodatID
Constructor Detail |
public CodatID()
public CodatID(PeerGroupID groupID)
groupID
- the group to which this content will belong.public CodatID(PeerGroupID groupID, Document document) throws java.io.IOException, java.security.NoSuchAlgorithmException
groupID
- PeerGroup to which this content will belong.document
- Document which will be associcated with this CodatIDpublic CodatID(PeerGroupID groupID, java.io.InputStream in) throws java.io.IOException, java.security.NoSuchAlgorithmException
groupID
- the group to which this dynamic content will belong.in
- the InputStream from which the content hash is
calculated. The stream is read until EOF and then closed.Method Detail |
public boolean isStatic()
public PeerGroupID getPeerGroupID()
public boolean equals(java.lang.Object id)
id
- CodatID to be checked withpublic java.lang.Object clone()
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |