sisc.modules.io
Class IO

java.lang.Object
  extended by sisc.util.Util
      extended by sisc.data.Expression
          extended by sisc.data.Value
              extended by sisc.data.Procedure
                  extended by sisc.nativefun.NativeProcedure
                      extended by sisc.nativefun.IndexedProcedure
                          extended by sisc.modules.io.IO
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Immediate, NamedValue, ExpressionVisitee, Version

public class IO
extends IndexedProcedure

See Also:
Serialized Form

Nested Class Summary
static class IO.Index
           
 
Field Summary
protected static int ABSPATHQ
           
protected static int CHARREADY
           
protected static int CLOSEINPUTPORT
           
protected static int CLOSEOUTPUTPORT
           
protected static int DISPLAY
           
protected static int FILEEXISTSQ
           
protected static int FINDRESOURCE
           
protected static int FINDRESOURCES
           
protected static int FLUSHOUTPUTPORT
           
protected static int INPORTLOCATION
           
protected static int INPORTQ
           
static Symbol IOB
           
protected static int LOAD
           
protected static int LOADEXPANDED
           
protected static int MAKEPATH
           
protected static int NORMALIZEURL
           
protected static int OPENAUTOFLUSHSTREAM
           
protected static int OPENAUTOFLUSHWRITER
           
protected static int OPENBUFFEREDCHARINPORT
           
protected static int OPENBUFFEREDCHAROUTPORT
           
protected static int OPENCHARINPUTPORT
           
protected static int OPENCHAROUTPUTPORT
           
protected static int OPENINPUTFILE
           
protected static int OPENOUTPUTFILE
           
protected static int OPENSOURCEINPUTFILE
           
protected static int OUTPORTQ
           
protected static int PEEKBYTE
           
protected static int PEEKCHAR
           
protected static int PORTQ
           
protected static int READ
           
protected static int READBYTE
           
protected static int READCHAR
           
protected static int READCODE
           
protected static int READSTRING
           
protected static int WRITE
           
protected static int WRITEBYTE
           
protected static int WRITECHAR
           
protected static int WRITESTRING
           
 
Fields inherited from class sisc.nativefun.IndexedProcedure
id
 
Fields inherited from class sisc.data.Expression
annotations, EMPTYSET
 
Fields inherited from class sisc.util.Util
BACKQUOTE, BEGIN, bundles, caseSensitive, EMPTYLIST, EMPTYVEC, EOF, ERRORK, EVAL, EXPSC, EXPTOP, FALSE, FCONT, FIVE, JEXCEPTION, LAMBDA, LOCATION, maxFloatPrecision, MESSAGE, minFloatPrecision, NAME, OTHER, PARENT, permitInterrupts, QUOTE, QUOTESYM, REPORT, SETBANG, SISC, SISC_SPECIFIC, SISCB, SOURCE_COLUMN, SOURCE_FILE, SOURCE_LINE, SYMENV, THIS, TOPLEVEL, TRUE, UNQUOTE, UNQUOTE_SPLICING, VOID, ZV
 
Fields inherited from interface sisc.util.Version
VERSION
 
Constructor Summary
IO()
           
IO(int id)
           
 
Method Summary
 Value displayOrWrite(Interpreter r, SchemeCharacterOutputPort port, Value v, boolean display)
           
 Value doApply(Interpreter f)
          A NativeProcedure instance must implement this method, which performs the actual processing specific to that procedure, and returns a Value.
static java.io.InputStream getURLInputStream(java.net.URL u)
           
static java.io.OutputStream getURLOutputStream(java.net.URL u)
           
static void load(Interpreter f, java.net.URL u, boolean expanded)
           
static SchemeCharacterInputPort openCharInFile(Interpreter f, java.net.URL u, Charset encoding)
           
static SchemeCharacterOutputPort openCharOutFile(Interpreter f, java.net.URL url, Charset encoding, boolean aflush)
           
static Value read(Interpreter r, SchemeCharacterInputPort i)
           
static Value readCode(Interpreter r, SchemeCharacterInputPort i)
           
static void throwIOException(Interpreter f, java.lang.String message, java.io.IOException e)
           
static java.net.URL urlClean(java.net.URL u)
           
 
Methods inherited from class sisc.nativefun.IndexedProcedure
deserialize, serialize
 
Methods inherited from class sisc.nativefun.NativeProcedure
apply, display
 
Methods inherited from class sisc.data.Procedure
error, throwArgSizeException, throwNestedPrimException, throwNestedPrimException, throwPrimException
 
Methods inherited from class sisc.data.Value
displayNamedOpaque, equals, eqv, eval, express, getValue, synopsis, synopsis, toString, valueEqual, valueHashCode, write, writeReplace
 
Methods inherited from class sisc.data.Expression
deserializeAnnotations, getAnnotation, getAnnotation, getAnnotationKeys, getAnnotations, getName, readExternal, readResolve, serializeAnnotations, setAnnotation, setAnnotation, setName, visit, visitAnnotations, writeExternal
 
Methods inherited from class sisc.util.Util
annotated, annotatedAppEval, append, argCheck, argsToSymbols, assq, bininport, bininstream, binoutport, binoutstream, box, character, charinport, charinreader, charoutport, charoutwriter, charsetFromString, chr, cont, currentClassLoader, env, error, error, error, error, error, error, error, expr, getDefaultCharacterSet, immutablePair, immutableVector, inport, javaExceptionToString, javaWrap, justify, length, liMessage, liMessage, liMessage, liMessage, liMessage, liMessage, liMessage, list, list, list, list, list, makeURL, mapcar, memq, nlib, num, outport, pair, pairToExpressions, pairToExpVect, pairToValues, proc, read, registerBundle, reverse, reverseInPlace, simpleErrorToString, sourceAnnotations, str, string, sym, symbol, symval, truePair, truth, truth, typeError, typeError, updateName, url, url, url, valArrayToList, valArrayToList, valArrayToVec, vec, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface sisc.data.NamedValue
getName, setName
 

Field Detail

IOB

public static Symbol IOB

ABSPATHQ

protected static final int ABSPATHQ
See Also:
Constant Field Values

CHARREADY

protected static final int CHARREADY
See Also:
Constant Field Values

CLOSEINPUTPORT

protected static final int CLOSEINPUTPORT
See Also:
Constant Field Values

CLOSEOUTPUTPORT

protected static final int CLOSEOUTPUTPORT
See Also:
Constant Field Values

DISPLAY

protected static final int DISPLAY
See Also:
Constant Field Values

FILEEXISTSQ

protected static final int FILEEXISTSQ
See Also:
Constant Field Values

FINDRESOURCE

protected static final int FINDRESOURCE
See Also:
Constant Field Values

FINDRESOURCES

protected static final int FINDRESOURCES
See Also:
Constant Field Values

FLUSHOUTPUTPORT

protected static final int FLUSHOUTPUTPORT
See Also:
Constant Field Values

INPORTQ

protected static final int INPORTQ
See Also:
Constant Field Values

INPORTLOCATION

protected static final int INPORTLOCATION
See Also:
Constant Field Values

LOAD

protected static final int LOAD
See Also:
Constant Field Values

LOADEXPANDED

protected static final int LOADEXPANDED
See Also:
Constant Field Values

MAKEPATH

protected static final int MAKEPATH
See Also:
Constant Field Values

NORMALIZEURL

protected static final int NORMALIZEURL
See Also:
Constant Field Values

OPENAUTOFLUSHSTREAM

protected static final int OPENAUTOFLUSHSTREAM
See Also:
Constant Field Values

OPENAUTOFLUSHWRITER

protected static final int OPENAUTOFLUSHWRITER
See Also:
Constant Field Values

OPENBUFFEREDCHARINPORT

protected static final int OPENBUFFEREDCHARINPORT
See Also:
Constant Field Values

OPENBUFFEREDCHAROUTPORT

protected static final int OPENBUFFEREDCHAROUTPORT
See Also:
Constant Field Values

OPENCHARINPUTPORT

protected static final int OPENCHARINPUTPORT
See Also:
Constant Field Values

OPENCHAROUTPUTPORT

protected static final int OPENCHAROUTPUTPORT
See Also:
Constant Field Values

OPENINPUTFILE

protected static final int OPENINPUTFILE
See Also:
Constant Field Values

OPENOUTPUTFILE

protected static final int OPENOUTPUTFILE
See Also:
Constant Field Values

OPENSOURCEINPUTFILE

protected static final int OPENSOURCEINPUTFILE
See Also:
Constant Field Values

OUTPORTQ

protected static final int OUTPORTQ
See Also:
Constant Field Values

PEEKBYTE

protected static final int PEEKBYTE
See Also:
Constant Field Values

PEEKCHAR

protected static final int PEEKCHAR
See Also:
Constant Field Values

PORTQ

protected static final int PORTQ
See Also:
Constant Field Values

READ

protected static final int READ
See Also:
Constant Field Values

READBYTE

protected static final int READBYTE
See Also:
Constant Field Values

READCHAR

protected static final int READCHAR
See Also:
Constant Field Values

READSTRING

protected static final int READSTRING
See Also:
Constant Field Values

READCODE

protected static final int READCODE
See Also:
Constant Field Values

WRITE

protected static final int WRITE
See Also:
Constant Field Values

WRITEBYTE

protected static final int WRITEBYTE
See Also:
Constant Field Values

WRITECHAR

protected static final int WRITECHAR
See Also:
Constant Field Values

WRITESTRING

protected static final int WRITESTRING
See Also:
Constant Field Values
Constructor Detail

IO

public IO(int id)

IO

public IO()
Method Detail

throwIOException

public static void throwIOException(Interpreter f,
                                    java.lang.String message,
                                    java.io.IOException e)
                             throws ContinuationException
Throws:
ContinuationException

read

public static Value read(Interpreter r,
                         SchemeCharacterInputPort i)
                  throws ContinuationException
Throws:
ContinuationException

readCode

public static Value readCode(Interpreter r,
                             SchemeCharacterInputPort i)
                      throws ContinuationException
Throws:
ContinuationException

displayOrWrite

public Value displayOrWrite(Interpreter r,
                            SchemeCharacterOutputPort port,
                            Value v,
                            boolean display)
                     throws ContinuationException
Throws:
ContinuationException

urlClean

public static java.net.URL urlClean(java.net.URL u)

openCharInFile

public static SchemeCharacterInputPort openCharInFile(Interpreter f,
                                                      java.net.URL u,
                                                      Charset encoding)
                                               throws ContinuationException
Throws:
ContinuationException

openCharOutFile

public static SchemeCharacterOutputPort openCharOutFile(Interpreter f,
                                                        java.net.URL url,
                                                        Charset encoding,
                                                        boolean aflush)
                                                 throws ContinuationException
Throws:
ContinuationException

getURLInputStream

public static java.io.InputStream getURLInputStream(java.net.URL u)
                                             throws java.io.IOException
Throws:
java.io.IOException

getURLOutputStream

public static java.io.OutputStream getURLOutputStream(java.net.URL u)
                                               throws java.io.IOException
Throws:
java.io.IOException

load

public static void load(Interpreter f,
                        java.net.URL u,
                        boolean expanded)
                 throws ContinuationException
Throws:
ContinuationException

doApply

public Value doApply(Interpreter f)
              throws ContinuationException
Description copied from class: NativeProcedure
A NativeProcedure instance must implement this method, which performs the actual processing specific to that procedure, and returns a Value.

Specified by:
doApply in class NativeProcedure
Throws:
ContinuationException