Commit 60b6a63c authored by mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Methods to load Lisp code directly from an InputStream.

parent fbdadbdb
...@@ -127,6 +127,24 @@ public final class Load ...@@ -127,6 +127,24 @@ public final class Load
{ {
return load(pathname, verbose, print, ifDoesNotExist, false, Keyword.DEFAULT); return load(pathname, verbose, print, ifDoesNotExist, false, Keyword.DEFAULT);
} }
public static final LispObject load(InputStream in)
{
return load(in, new SimpleString("UTF-8"));
}
public static final LispObject load(InputStream in, LispObject format) {
Stream stream = new Stream(Symbol.SYSTEM_STREAM, in, Symbol.CHARACTER,
format);
final LispThread thread = LispThread.currentThread();
return loadFileFromStream(null,
null,
stream,
Symbol.LOAD_VERBOSE.symbolValue(thread) != NIL,
Symbol.LOAD_PRINT.symbolValue(thread) != NIL,
false);
}
public static final LispObject load(final Pathname pathname, public static final LispObject load(final Pathname pathname,
boolean verbose, boolean verbose,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment