public class EXDROutputStream
extends java.io.FilterOutputStream
Use the method write(Object)
to convert
Java CompoundTerm objects and instances of other relevant Java classes into EXDR format
so that data can be read in by ECLiPSe.
EXDROutputStream also uses a buffer: rather than writing to the underlying OutputStream byte-by-byte, EXDR data is written to the buffer and then copied to the OutputStream when a whole term has been completed.
Note that EXDROutputStream objects are often constructed using ToEclipseQueues.
CompoundTerm
,
ToEclipseQueue
Constructor and Description |
---|
EXDROutputStream(java.io.OutputStream s)
Construct an EXDROutputStream which will write
EXDR to a named OutputStream.
|
EXDROutputStream(java.io.OutputStream s,
boolean compressStrings)
Construct an EXDROutputStream which will write
EXDR with optionally compressed strings to a named OutputStream.
|
Modifier and Type | Method and Description |
---|---|
void |
enableCompression(boolean compress)
Enable / disable string compression for subsequently written terms.
|
void |
flush()
Flushes the underlying OutputStream.
|
void |
write(java.lang.Object o)
Write an Object to the underlying stream in EXDR format.
|
public EXDROutputStream(java.io.OutputStream s)
public EXDROutputStream(java.io.OutputStream s, boolean compressStrings)
public void write(java.lang.Object o) throws java.io.IOException
null
- this is interpreted as a variable in ECLiPSe. java.lang.IllegalArgumentException
- if the parameter is of an unrecognised
class, or if Not-a-number (NaN)-valued Floats or Doubles are
supplied.java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException
public void enableCompression(boolean compress)