Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sexp
Interface SExpression

All Known Implementing Classes:
  BaseSexp, Sexp, SList

public interface SExpression

This interface that must be implemented by all SExpressions classes. An S-Expression is either:

- an octet-string, or
- a finite list of simpler S-Expressions.

NOTE:The basic S-Expression is always a list!

Version:
  $Id: SExpression.java,v 1.1.1.2 2002/05/08 22:48:27 tep Exp $
Author:
  Per Harald Myrvang <perm@pasta.cs.uit.no>
See Also:
  `SList`, `SOctetStream`

Field Summary
`static String` | `versionString` Version string.

Method Summary
`boolean` | `equals(Object that)` Compare this SExpression object with the provided object.
`void` | `free()` Destructive resource deallocation.
`boolean` | `isList()` Returns `true` if this S-Expression is a list of simpler S-Expressions, or `false` if this object is an octet-string object.
`byte[]` | `toAdvanced()` Returns this S-Expression as a byte array, where the components are represented in their Advanced representation (that is, pretty-printed).
`void` | `toAdvanced(OutputStream out)` Writes this S-Expression to an OutputStream.
`byte[]` | `toCanonical()` Returns this S-Expression as a `byte array`.
`void` | `toCanonical(OutputStream out)` Write this S-Expression to an OutputStream.
`String` | `toString()` Returns this S-Expression in its Advanced representation, as a `String`.
`byte[]` | `toTransport()` Returns this S-Expression as a `byte array`, in transport representation.
`void` | `toTransport(OutputStream out)` Write this S-Expression to an OutputStream.

Field Detail

### versionString

    public static final String versionString

  Version string.

Method Detail

### isList

    public boolean isList()

  Returns `true` if this S-Expression is a list of simpler S-Expressions, or `false` if this object is an octet-string object.

### free

    public void free()

  Destructive resource deallocation. Zeroes out data when possible. Could preferably be called by implementing object's finalize().

### equals

    public boolean equals(Object that)

  Compare this SExpression object with the provided object. The comparison semantics depends both on the implementing class, and the that instance. Generally, it is permissible to compare instances of the same class, and with java.lang.String objects.
  Overrides:
    equals in class Object

### toCanonical

    public byte[] toCanonical()

  Returns this S-Expression as a `byte array`. The components are represented in their canonical representation.

### toCanonical

    public void toCanonical(OutputStream out)

  Write this S-Expression to an OutputStream. The components are represented in their canonical representation.

### toTransport

    public byte[] toTransport()

  Returns this S-Expression as a `byte array`, in transport representation.

### toTransport

    public void toTransport(OutputStream out)

  Write this S-Expression to an OutputStream. The components are represented in transport representation.

### toString

    public String toString()

  Returns this S-Expression in its Advanced representation, as a `String`.
  Overrides:
    toString in class Object

### toAdvanced

    public byte[] toAdvanced()

  Returns this S-Expression as a byte array, where the components are represented in their Advanced representation (that is, pretty-printed).

### toAdvanced

    public void toAdvanced(OutputStream out)

  Writes this S-Expression to an OutputStream. The components are represented in transport representation.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD