Package com.parctechnologies.eclipse
Class EXDRInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.DataInputStream
-
- com.parctechnologies.eclipse.EXDRInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.DataInput
,java.lang.AutoCloseable
public class EXDRInputStream extends java.io.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:
CompoundTerm
,FromEclipseQueue
-
-
Constructor Summary
Constructors Constructor Description EXDRInputStream(java.io.InputStream in)
Construct an EXDRInputStream using a given InputStream for incoming data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
readTerm()
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.).-
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
-
-
-
Method Detail
-
readTerm
public java.lang.Object readTerm() throws java.io.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:
java.io.IOException
-
-