All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Jaja.InputPort

java.lang.Object
   |
   +----Jaja.Jaja
           |
           +----Jaja.Value
                   |
                   +----Jaja.Port
                           |
                           +----Jaja.InputPort

public class InputPort
extends Port
implements InputPortAble

Variable Index

 o name
 o stream

Constructor Index

 o InputPort(String)
This constructor may open a remote file if given an URL.
 o InputPort(String, Reader)

Method Index

 o close()
 o initializeAsFile(String)
 o initializeAsURL(String)
 o peekChar()
 o read()
Read a single Sexpression from an input port.
 o read(String)
Convert a string into a Sexpression.
 o read_char()
Read a single char.
 o read_file()
Read a whole file and return the list of the Sexpressions it contained.
 o toString()
Convert a Value into a human-readable Java String.

Variables

 o name
 protected String name
 o stream
 protected Reader stream

Constructors

 o InputPort
 protected InputPort(String s,
                     Reader is)
 o InputPort
 public InputPort(String s)
This constructor may open a remote file if given an URL. The difficulty is to parse an URL relative to the URL of the applet if the interpreter is run from an applet.

Methods

 o initializeAsURL
 public void initializeAsURL(String s) throws IOException
 o initializeAsFile
 public void initializeAsFile(String s) throws IOException
 o close
 public void close()
Overrides:
close in class Port
 o toString
 public String toString()
Convert a Value into a human-readable Java String.

Overrides:
toString in class Value
 o peekChar
 protected int peekChar() throws IOException
 o read_char
 public Value read_char()
Read a single char.

 o read_file
 public Value read_file()
Read a whole file and return the list of the Sexpressions it contained. You have to prefix this list with the begin special form operator if you want to evaluate it.

 o read
 public static Value read(String s)
Convert a string into a Sexpression. The string should only contain a single Sexpression (superfluous Sexpressions will be ignored).

 o read
 public Value read()
Read a single Sexpression from an input port.


All Packages  Class Hierarchy  This Package  Previous  Next  Index