org.freehep.postscript
Class PSInputFile

java.lang.Object
  extended by org.freehep.postscript.PSObject
      extended by org.freehep.postscript.PSComposite
          extended by org.freehep.postscript.PSFile
              extended by org.freehep.postscript.PSInputFile
All Implemented Interfaces:
Cloneable, PSDataSource, PSTokenizable

public class PSInputFile
extends PSFile
implements PSTokenizable, PSDataSource

Objects for PostScript Processor, as defined in 3.3 Data Types and Objects

Version:
$Id: PSInputFile.java 8951 2006-09-12 21:44:14Z duns $
Author:
Mark Donszelmann

Field Summary
protected  DSC dsc
           
protected  InputStream in
           
protected  Scanner scanner
           
 
Fields inherited from class org.freehep.postscript.PSFile
filename, filter
 
Fields inherited from class org.freehep.postscript.PSComposite
access, EXECUTE_ONLY, NONE, READ_ONLY, UNLIMITED
 
Fields inherited from class org.freehep.postscript.PSObject
name
 
Constructor Summary
  PSInputFile(InputStream input, DSC dsc)
           
  PSInputFile(String filename)
           
protected PSInputFile(String n, boolean f, InputStream i, Scanner s, DSC d)
           
  PSInputFile(String filename, DSC dsc)
           
 
Method Summary
 int available()
           
 Object clone()
           
 void close()
           
 PSObject copy()
           
 boolean equals(Object o)
           
 boolean execute(OperandStack os)
           
 void flush()
           
 DSC getDSC()
           
 InputStream getInputStream()
           
 int hashCode()
           
 boolean isValid()
           
 void mark(int readLimit)
           
 boolean markSupported()
           
 int read()
           
 String readLine()
           
 void reset()
           
 PSObject token(boolean packingMode, NameLookup lookup)
           
 
Methods inherited from class org.freehep.postscript.PSFile
cvs, getFilePointer, getType, seek, toString, write
 
Methods inherited from class org.freehep.postscript.PSComposite
accessExecute, accessRead, accessWrite, changeAccess
 
Methods inherited from class org.freehep.postscript.PSObject
checkAndExecute, error, isExecutable, isLiteral, setExecutable, setLiteral, setName, toPrint
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

in

protected InputStream in

scanner

protected Scanner scanner

dsc

protected DSC dsc
Constructor Detail

PSInputFile

protected PSInputFile(String n,
                      boolean f,
                      InputStream i,
                      Scanner s,
                      DSC d)

PSInputFile

public PSInputFile(InputStream input,
                   DSC dsc)
            throws IOException
Throws:
IOException

PSInputFile

public PSInputFile(String filename)
            throws FileNotFoundException,
                   IOException
Throws:
FileNotFoundException
IOException

PSInputFile

public PSInputFile(String filename,
                   DSC dsc)
            throws FileNotFoundException,
                   IOException
Throws:
FileNotFoundException
IOException
Method Detail

getInputStream

public InputStream getInputStream()
Specified by:
getInputStream in interface PSDataSource

getDSC

public DSC getDSC()
Specified by:
getDSC in interface PSDataSource

token

public PSObject token(boolean packingMode,
                      NameLookup lookup)
               throws IOException,
                      SyntaxException,
                      NameNotFoundException
Specified by:
token in interface PSTokenizable
Throws:
IOException
SyntaxException
NameNotFoundException

execute

public boolean execute(OperandStack os)
Overrides:
execute in class PSFile

close

public void close()
           throws IOException
Specified by:
close in class PSFile
Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in interface PSDataSource
Overrides:
read in class PSFile
Throws:
IOException

readLine

public String readLine()
                throws IOException
Overrides:
readLine in class PSFile
Throws:
IOException

available

public int available()
              throws IOException
Overrides:
available in class PSFile
Throws:
IOException

flush

public void flush()
           throws IOException
Overrides:
flush in class PSFile
Throws:
IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class PSFile

mark

public void mark(int readLimit)
Overrides:
mark in class PSFile

reset

public void reset()
           throws IOException
Specified by:
reset in interface PSDataSource
Overrides:
reset in class PSFile
Throws:
IOException

isValid

public boolean isValid()
Specified by:
isValid in class PSFile

hashCode

public int hashCode()
Specified by:
hashCode in class PSObject

equals

public boolean equals(Object o)
Specified by:
equals in class PSObject

clone

public Object clone()
Specified by:
clone in class PSObject

copy

public PSObject copy()
Specified by:
copy in class PSObject


Copyright © 2000-2006 FreeHEP. All Rights Reserved.