|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.ps.PsObjectComposite
org.foray.ps.PsFile
public abstract class PsFile
Abstract superclass for PostScript "file" objects. A subclass instance can be a wrapper around one of several things: 1) a real file, 2) an input source, like standard input, or 3) a filter that sits on top of another PsFile instance.
Constructor Summary | |
---|---|
PsFile()
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes this file. |
protected void |
closeFile(PsInterpreter4a interpreter)
Close the input file. |
PsObject |
duplicate()
This is a shallow copy. |
protected abstract byte[] |
getNextChunk()
Returns the next chunk of content for this file. |
protected byte[] |
getRemainingChunk()
Return the last chunk for this file. |
PsName |
getTypeName()
Needed for the "type" operator. |
boolean |
isComparable(PsObject object)
Test the comparability of two PSObjects. |
boolean |
isComposite()
The method should be overridden by composite objects. |
boolean |
isExecutable()
Indicates whether this object is executable. |
boolean |
isOpen()
Indicates whether this file is open. |
protected byte |
provideInput(PsInterpreter4a interpreter)
Returns the next byte from this file. |
void |
setPopDictionaryStack(boolean popDictionary)
Sets the pop dictionary stack property. |
Methods inherited from class org.foray.ps.PsObjectComposite |
---|
getAccess, setAccess |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PsFile()
Method Detail |
---|
public PsObject duplicate()
PsObject
public boolean isComposite()
PsObject
public boolean isExecutable()
PsObject
protected byte provideInput(PsInterpreter4a interpreter) throws IOException, PsOperatorException
interpreter
- The parent interpreter.
IOException
- For I/O Errors.
PsOperatorException
- For PostScript error closing the file.protected abstract byte[] getNextChunk() throws IOException
IOException
- For I/O Errors.protected void closeFile(PsInterpreter4a interpreter) throws PsOperatorException
interpreter
- The parent interpreter.
PsOperatorException
- For error popping the dictionary stack.protected byte[] getRemainingChunk()
public boolean isComparable(PsObject object)
PsObject
object
- The object that should be tested for comparability.
this
is comparable to object
,
false otherwise.public PsName getTypeName()
PsObject
public boolean isOpen()
public void setPopDictionaryStack(boolean popDictionary)
popDictionary
- Set to true if the dictionary stack should be popped
when this file has been completely read.public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |