fi.hut.tcm.spki
Class ByteString

java.lang.Object
  |
  +--fi.hut.tcm.spki.ByteString
Direct Known Subclasses:
CertDisplay, Comment, Deleg, Gte, HashValue, KVal, Lte, OnlineType, RangeOrdering, Time, Uri

public class ByteString
extends java.lang.Object
implements Component

ByteString


Field Summary
private  byte[] bytes
           
private  byte[] displayType
          This is a display hint for this individual field.
 
Constructor Summary
ByteString()
           
ByteString(byte[] value)
           
ByteString(byte[] value, byte[] display)
           
ByteString(java.lang.String value)
           
ByteString(java.lang.String value, java.lang.String display)
           
 
Method Summary
 void accept(Visitor visitor)
           
 boolean equals(java.lang.Object other)
           
 byte[] getDisplayHintBytes()
           
 java.lang.String getDisplayHintString()
           
 byte[] getValueBytes()
           
 java.lang.String getValueString()
           
 void setDisplayHint(byte[] display)
           
 void setDisplayHint(java.lang.String display)
           
 void setValue(byte[] string)
          Sets the value of the ByteString.
 void setValue(java.lang.String string)
          Sets the value of the ByteString.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

displayType

private byte[] displayType
This is a display hint for this individual field.

bytes

private byte[] bytes
Constructor Detail

ByteString

public ByteString()

ByteString

public ByteString(byte[] value)

ByteString

public ByteString(java.lang.String value)

ByteString

public ByteString(byte[] value,
                  byte[] display)

ByteString

public ByteString(java.lang.String value,
                  java.lang.String display)
Method Detail

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Component

setDisplayHint

public void setDisplayHint(byte[] display)

setDisplayHint

public void setDisplayHint(java.lang.String display)

getDisplayHintBytes

public byte[] getDisplayHintBytes()

getDisplayHintString

public java.lang.String getDisplayHintString()

setValue

public void setValue(byte[] string)
              throws SPKIException
Sets the value of the ByteString. Subclasses with content constraints may override this method and throw a SPKIException if trying to set an illegal value.

setValue

public void setValue(java.lang.String string)
              throws SPKIException
Sets the value of the ByteString. Subclasses with content constraints may override this method and throw a SPKIException if trying to set an illegal value.

getValueBytes

public byte[] getValueBytes()

getValueString

public java.lang.String getValueString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object