|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.UrnType
This class defines the types of URNs supported in the application and provides utility functions for handling urn types.
URN
,
UrnCache
,
Serialized FormField Summary | |
static UrnType |
ANY_TYPE
The UrnType for specifying any URN type. |
static java.util.Set |
ANY_TYPE_SET
Constant for specifying any type of URN for replies. |
static UrnType |
INVALID
The UrnType for an invalid UrnType. |
static UrnType |
SHA1
The UrnType for SHA1 hashes. |
static java.util.Set |
SHA1_SET
Constant for specifying SHA1 URNs in replies. |
static java.lang.String |
SHA1_STRING
Identifier string for the SHA1 type. |
static java.lang.String |
URN_NAMESPACE_ID
Constant for the leading URN string identifier, as specified in RFC 2141. |
Method Summary | |
static UrnType |
createUrnType(java.lang.String type)
Factory method for obtaining UrnType instances from strings. |
boolean |
equals(java.lang.Object o)
It is necessary for this class to override equals because the readResolve method was not added to the serialization API until Java 1.2, which means that we cannot use it to ensure that the UrnType enum constants are actually the same instances upon deserialization. |
int |
hashCode()
Overridden to meet the contract of Object.hashCode. |
boolean |
isSHA1()
Returns whether or not this URN type is SHA1. |
static boolean |
isSupportedUrnType(java.lang.String urnString)
Returns whether or not the string argument is a urn type that we know about. |
java.lang.String |
toString()
Returns the string representation of this URN type. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String SHA1_STRING
public static final UrnType INVALID
public static final UrnType SHA1
public static final UrnType ANY_TYPE
public static final transient java.util.Set SHA1_SET
public static final transient java.util.Set ANY_TYPE_SET
public static final java.lang.String URN_NAMESPACE_ID
Method Detail |
public boolean isSHA1()
public java.lang.String toString()
public boolean equals(java.lang.Object o)
o
- the Object to compare for equality
Object.equals(Object)
public int hashCode()
Object.hashCode()
public static UrnType createUrnType(java.lang.String type)
type
- the string representation of the urn type
public static boolean isSupportedUrnType(java.lang.String urnString)
urnString
- to string to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |