Class ConfEString

Object
com.tailf.proto.ConfEObject
com.tailf.proto.ConfEString
All Implemented Interfaces:
Serializable, Cloneable

public class ConfEString extends ConfEObject implements Serializable, Cloneable
Provides a Java representation of E strings.
See Also:
  • Constructor Details

    • ConfEString

      public ConfEString(String str)
      Create an E string from the given string.
    • ConfEString

      public ConfEString(ConfInputStream buf) throws ConfEDecodeException
      Create an E string from a stream containing a string encoded in E external format.
      Parameters:
      buf - the stream containing the encoded string.
      Throws:
      ConfEDecodeException - if the buffer does not contain a valid external representation of an E string.
  • Method Details

    • stringValue

      public String stringValue()
      Get the actual string contained in this object.
      Returns:
      the raw string contained in this object, without regard to E quoting rules.
      See Also:
    • toString

      public String toString()
      Get the printable version of the string contained in this object.
      Specified by:
      toString in class ConfEObject
      Returns:
      the string contained in this object, quoted.
      See Also:
    • encode

      public void encode(ConfOutputStream buf)
      Convert this string to the equivalent E external representation.
      Specified by:
      encode in class ConfEObject
      Parameters:
      buf - an output stream to which the encoded string should be written.
    • equals

      public boolean equals(Object o)
      Determine if two strings are equal. They are equal if they represent the same sequence of characters. This method can be used to compare ConfEStrings with each other and with Strings.
      Specified by:
      equals in class ConfEObject
      Parameters:
      o - the ConfEString or String to compare to.
      Returns:
      true if the strings consist of the same sequence of characters, false otherwise.