org.opensaml.artifact
Class SAMLArtifact.TypeCode

java.lang.Object
  extended byorg.opensaml.artifact.TwoByteSequence
      extended byorg.opensaml.artifact.SAMLArtifact.TypeCode
All Implemented Interfaces:
Artifact.TypeCode, ByteSizedSequence
Enclosing class:
SAMLArtifact

public static final class SAMLArtifact.TypeCode
extends TwoByteSequence
implements Artifact.TypeCode

A TypeCode is an arbitrary two-byte sequence. The most important method defined by this class is the getParser() method.


Field Summary
 
Fields inherited from class org.opensaml.artifact.TwoByteSequence
byte0, byte1
 
Constructor Summary
SAMLArtifact.TypeCode(byte b0, byte b1)
          The workhorse constructor.
SAMLArtifact.TypeCode(short tc)
          A convenience constructor.
 
Method Summary
 Artifact.Parser getParser()
          Gets the Artifact.Parser object corresponding to this TypeCode.
 String toString()
          Converts this TypeCode object to a string.
 
Methods inherited from class org.opensaml.artifact.TwoByteSequence
equals, getBytes, hashCode, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opensaml.artifact.ByteSizedSequence
equals, getBytes, hashCode, size
 

Constructor Detail

SAMLArtifact.TypeCode

public SAMLArtifact.TypeCode(byte b0,
                             byte b1)
The workhorse constructor.


SAMLArtifact.TypeCode

public SAMLArtifact.TypeCode(short tc)
A convenience constructor.

Method Detail

toString

public String toString()
Converts this TypeCode object to a string. The two bytes are hex-encoded and prefixed by "0x". The result is the string equivalent of a hex integer.

Specified by:
toString in interface ByteSizedSequence
Overrides:
toString in class TwoByteSequence
Returns:
a string version of this type code
See Also:
Hex

getParser

public Artifact.Parser getParser()
                          throws ArtifactParserException
Gets the Artifact.Parser object corresponding to this TypeCode.

Specified by:
getParser in interface Artifact.TypeCode
Returns:
an artifact parser
Throws:
ArtifactParserException - if unable to get the Parser associated with this Artifact.


Copyright ? 2005 UCAID. All Rights Reserved.