Class ConfEObject

Object
com.tailf.proto.ConfEObject
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ConfEAtom, ConfEBig, ConfEBinary, ConfEDouble, ConfEList, ConfELong, ConfEPid, ConfERef, ConfEString, ConfETuple

public abstract class ConfEObject extends Object implements Serializable, Cloneable
Base class of the E data type classes. This class is used to represent an arbitrary E term.
See Also:
  • Constructor Details

    • ConfEObject

      public ConfEObject()
  • Method Details

    • toString

      public abstract String toString()
      Overrides:
      toString in class Object
      Returns:
      the printable representation of the object. This is usually similar to the representation used by E for the same type of object.
    • encode

      public abstract void encode(ConfOutputStream buf)
      Convert the object according to the rules of the E external format. This is mainly used for sending E terms in messages, however it can also be used for storing terms to disk.
      Parameters:
      buf - an output stream to which the encoded term should be written.
    • decode

      public static ConfEObject decode(ConfInputStream buf) throws ConfEDecodeException
      Read binary data in the E external format, and produce a corresponding E data type object. This method is normally used when E terms are received in messages, however it can also be used for reading terms from disk.
      Parameters:
      buf - an input stream containing one or more encoded E terms.
      Returns:
      an object representing one of the E data types.
      Throws:
      ConfEDecodeException - if the stream does not contain a valid representation of an E term.
    • equals

      public abstract boolean equals(Object o)
      Determine if two E objects are equal. In general, E objects are equal if the components they consist of are equal.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare to.
      Returns:
      true if the objects are identical.
    • clone

      public Object clone()