Changeset 14634


Ignore:
Timestamp:
03/03/14 19:14:04 (9 years ago)
Author:
Mark Evenson
Message:

Methods to load Lisp code directly from an InputStream?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Load.java

    r14591 r14634  
    128128        return load(pathname, verbose, print, ifDoesNotExist, false, Keyword.DEFAULT);
    129129    }
     130 
     131    public static final LispObject load(InputStream in)
     132    {
     133      return load(in, new SimpleString("UTF-8"));
     134    }
     135 
     136    public static  final LispObject load(InputStream in, LispObject format) {
     137        Stream stream = new Stream(Symbol.SYSTEM_STREAM, in, Symbol.CHARACTER,
     138                                   format);
     139        final LispThread thread = LispThread.currentThread();
     140        return loadFileFromStream(null,
     141                                  null,
     142                                  stream,
     143                                  Symbol.LOAD_VERBOSE.symbolValue(thread) != NIL,
     144                                  Symbol.LOAD_PRINT.symbolValue(thread) != NIL,
     145                                  false);
     146    }
     147
    130148
    131149    public static final LispObject load(final Pathname pathname,
Note: See TracChangeset for help on using the changeset viewer.