Class EXDRInputStream

All Implemented Interfaces:
Closeable, DataInput, AutoCloseable

public class EXDRInputStream extends DataInputStream
A stream which can read EXDR format. An EXDRInputStream can be constructed from any instance of the InputStream class and extends it to be able to interpret incoming data which is in the EXDR (ECLiPSe eXternal Data Representation) format.

Use the method readTerm() to convert from EXDR into Java CompoundTerm objects and instances of other relevant Java classes which represent ECLiPSe types.

Note that EXDRInputStream objects are often constructed using the FromEclipseQueue class.

See Also:
  • Constructor Details

    • EXDRInputStream

      public EXDRInputStream(InputStream in)
      Construct an EXDRInputStream using a given InputStream for incoming data.
  • Method Details

    • readTerm

      public Object readTerm() throws IOException
      Read a chunk (one term's worth) of EXDR from the incoming data and convert it into the corresponding object (an instance of CompoundTerm, Integer, etc.). This works as an atomic action so no other thread can read until the complete term has been read in.
      Throws:
      IOException