|
JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.id.ID
net.jxta.content.ContentID
net.jxta.impl.id.UUID.ContentID
public class ContentID
An implementation of the ContentID ID Type.
The format of the ID is broken down as follows:
0 - 15 PeerGroupID
16 - 31 Unique Content ID
32 Mode Byte:
Bit 7: Static content flag
Bits 6 - 0: Integer representing number the number of bytes
used for the variant ID.
33 - 62 Optional variant ID data. Bytes not declared as used via the
integer portion of the mode byte should be zero-filled.
63 IDType
| Field Summary | |
|---|---|
protected static int |
groupIdOffset
Location of the group id in the byte array. |
protected IDBytes |
id
The id data. |
protected static int |
indexIdLength
Length of the indexable/unique ID field. |
protected static int |
indexIdOffset
Location of the indexable/unique ID of the content. |
protected static int |
modeOffset
Location of the mode byte used to flag static content as well as to indicate the length of the optional variant data. |
protected static int |
variantMaxLength
Maximum number of bytes that can be used as the unique value. |
protected static int |
variantOffset
Location of the variant hash value portion of the id within the byte array. |
| Fields inherited from class net.jxta.id.ID |
|---|
nullID, serialVersionUID, URIEncodingName, URNNamespace |
| Method Summary | |
|---|---|
boolean |
equals(Object target)
|
String |
getIDFormat()
Returns a string identifier which indicates which ID format is used by this ID instance. |
ID |
getPeerGroupID()
Returns PeerGroupID of the Peer Group to which this Content ID belongs. |
Object |
getUniqueValue()
Returns an object containing the unique value of the ID. |
Object |
getVariantValue()
Returns an object containing the value of the variant portion of this ID. |
int |
hashCode()
|
boolean |
isStatic()
Returns true if this ContentID is associated with a static Content. |
| Methods inherited from class net.jxta.content.ContentID |
|---|
create, intern |
| Methods inherited from class net.jxta.id.ID |
|---|
toString, toURI |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final int groupIdOffset
protected static final int indexIdOffset
protected static final int indexIdLength
protected static final int modeOffset
protected static final int variantOffset
protected static final int variantMaxLength
protected IDBytes id
| Constructor Detail |
|---|
protected ContentID(IDBytes id)
id - the ID dataprotected ContentID()
protected ContentID(PeerGroupID groupID)
protected ContentID(PeerGroupID groupID,
UUID indexUUID)
public ContentID(PeerGroupID groupID,
boolean contentIsStatic)
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean).
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
byte[] indexSeed)
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,byte[]).
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
InputStream indexSeed)
throws IOException
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,InputStream).
IOException
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
byte[] indexSeed,
byte[] variant)
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,byte[],byte[]).
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
InputStream indexSeed,
byte[] variant)
throws IOException
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,InputStream,byte[]).
IOException
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
byte[] indexSeed,
InputStream variant)
throws IOException
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,byte[],InputStream).
IOException
public ContentID(PeerGroupID groupID,
boolean contentIsStatic,
InputStream indexSeed,
InputStream variant)
throws IOException
IDFactory.Instantiator.newContentID(net.jxta.peergroup.PeerGroupID,boolean,InputStream,InputStream).
IOException| Method Detail |
|---|
public Object getVariantValue()
getVariantValue in class ContentIDpublic boolean equals(Object target)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String getIDFormat()
getIDFormat in class IDpublic Object getUniqueValue()
this.
getUniqueValue in class IDpublic ID getPeerGroupID()
getPeerGroupID in class ContentIDpublic boolean isStatic()
isStatic in class ContentID
|
JXSE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||