gnu.prolog.vm
Class PrologStream
java.lang.Object
gnu.prolog.vm.PrologStream
- Direct Known Subclasses:
- BinaryPrologStream, TextInputPrologStream, TextOutputPrologStream
public abstract class PrologStream
- extends Object
Method Summary |
void |
checkExists()
|
void |
close(boolean force)
|
protected void |
debug(Exception ex)
|
abstract void |
flushOutput(Term streamTerm)
|
abstract int |
getByte(Term streamTerm,
Interpreter interpreter)
|
abstract int |
getCode(Term streamTerm,
Interpreter interpreter)
|
int |
getCurrentColumn()
|
int |
getCurrentLine()
|
Term |
getEndOfStreamState()
|
AtomTerm |
getMode()
|
abstract Term |
getPosition(Term streamTerm,
Interpreter interpreter)
|
void |
getProperties(List<Term> list)
|
Term |
getStreamTerm()
|
abstract int |
peekByte(Term streamTerm,
Interpreter interpreter)
|
abstract int |
peekCode(Term streamTerm,
Interpreter interpreter)
|
abstract void |
putByte(Term streamTerm,
Interpreter interpreter,
int _byte)
|
abstract void |
putCode(Term streamTerm,
Interpreter interpreter,
int code)
|
abstract void |
putCodeSequence(Term streamTerm,
Interpreter interpreter,
String seq)
|
abstract Term |
readTerm(Term streamTerm,
Interpreter interpreter,
ReadOptions options)
|
abstract void |
setPosition(Term streamTerm,
Interpreter interpreter,
Term pos)
|
abstract void |
writeTerm(Term streamTerm,
Interpreter interpreter,
WriteOptions options,
Term term)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
filenameTag
public static final CompoundTermTag filenameTag
modeTag
public static final CompoundTermTag modeTag
aliasTag
public static final CompoundTermTag aliasTag
positionTag
public static final CompoundTermTag positionTag
endOfStreamTag
public static final CompoundTermTag endOfStreamTag
eofActionTag
public static final CompoundTermTag eofActionTag
repositionTag
public static final CompoundTermTag repositionTag
typeTag
public static final CompoundTermTag typeTag
atAtom
public static final AtomTerm atAtom
pastAtom
public static final AtomTerm pastAtom
notAtom
public static final AtomTerm notAtom
inputAtom
public static final AtomTerm inputAtom
outputAtom
public static final AtomTerm outputAtom
errorAtom
public static final AtomTerm errorAtom
eofCodeAtom
public static final AtomTerm eofCodeAtom
resetAtom
public static final AtomTerm resetAtom
repositionAtom
public static final AtomTerm repositionAtom
streamAtom
public static final AtomTerm streamAtom
readAtom
public static final AtomTerm readAtom
userInputAtom
public static final AtomTerm userInputAtom
userOutputAtom
public static final AtomTerm userOutputAtom
textAtom
public static final AtomTerm textAtom
binaryAtom
public static final AtomTerm binaryAtom
appendAtom
public static final AtomTerm appendAtom
streamOrAliasAtom
public static final AtomTerm streamOrAliasAtom
openAtom
public static final AtomTerm openAtom
sourceSinkAtom
public static final AtomTerm sourceSinkAtom
writeAtom
public static final AtomTerm writeAtom
endOfFileAtom
public static final AtomTerm endOfFileAtom
filename
protected AtomTerm filename
mode
protected AtomTerm mode
reposition
protected AtomTerm reposition
eofAction
protected AtomTerm eofAction
endOfStream
protected AtomTerm endOfStream
type
protected AtomTerm type
aliases
protected Set<AtomTerm> aliases
streamTerm
protected Term streamTerm
closed
protected boolean closed
environment
protected Environment environment
PrologStream
protected PrologStream(PrologStream.OpenOptions options)
checkExists
public void checkExists()
throws PrologException
- Throws:
PrologException
getStreamTerm
public Term getStreamTerm()
getMode
public AtomTerm getMode()
getProperties
public void getProperties(List<Term> list)
throws PrologException
- Throws:
PrologException
getByte
public abstract int getByte(Term streamTerm,
Interpreter interpreter)
throws PrologException
- Throws:
PrologException
peekByte
public abstract int peekByte(Term streamTerm,
Interpreter interpreter)
throws PrologException
- Throws:
PrologException
putByte
public abstract void putByte(Term streamTerm,
Interpreter interpreter,
int _byte)
throws PrologException
- Throws:
PrologException
getEndOfStreamState
public Term getEndOfStreamState()
throws PrologException
- Throws:
PrologException
getPosition
public abstract Term getPosition(Term streamTerm,
Interpreter interpreter)
throws PrologException
- Throws:
PrologException
setPosition
public abstract void setPosition(Term streamTerm,
Interpreter interpreter,
Term pos)
throws PrologException
- Throws:
PrologException
getCode
public abstract int getCode(Term streamTerm,
Interpreter interpreter)
throws PrologException
- Throws:
PrologException
peekCode
public abstract int peekCode(Term streamTerm,
Interpreter interpreter)
throws PrologException
- Throws:
PrologException
putCode
public abstract void putCode(Term streamTerm,
Interpreter interpreter,
int code)
throws PrologException
- Throws:
PrologException
putCodeSequence
public abstract void putCodeSequence(Term streamTerm,
Interpreter interpreter,
String seq)
throws PrologException
- Throws:
PrologException
readTerm
public abstract Term readTerm(Term streamTerm,
Interpreter interpreter,
ReadOptions options)
throws PrologException
- Throws:
PrologException
writeTerm
public abstract void writeTerm(Term streamTerm,
Interpreter interpreter,
WriteOptions options,
Term term)
throws PrologException
- Throws:
PrologException
flushOutput
public abstract void flushOutput(Term streamTerm)
throws PrologException
- Throws:
PrologException
close
public void close(boolean force)
throws PrologException
- Throws:
PrologException
getCurrentLine
public int getCurrentLine()
getCurrentColumn
public int getCurrentColumn()
debug
protected void debug(Exception ex)