Package javax.isolate

Examples of javax.isolate.StreamBindings


        // to the isolate via a link message.  Note that the 4th one is the command
        // shell's error stream!!
//        if (ios.length > 3) {
//            throw new RuntimeException("> 3 CommandIOs not implemented yet");
//        }
        StreamBindings streamBindings = new StreamBindings();
        Closeable in = ios[Command.STD_IN].findBaseStream();
        if (in instanceof FileInputStream) {
            streamBindings.setIn((FileInputStream) in);
        } else {
            streamBindings.setIn(createSocketForInput(in));
        }
        Closeable out = ios[Command.STD_OUT].findBaseStream();
        if (out instanceof FileOutputStream) {
            streamBindings.setOut((FileOutputStream) out);
        } else {
            streamBindings.setOut(createSocketForOutput(out));
        }
        Closeable err = ios[Command.STD_ERR].findBaseStream();
        if (err instanceof FileOutputStream) {
            streamBindings.setErr((FileOutputStream) err);
        } else {
            streamBindings.setErr(createSocketForOutput(err));
        }
        return streamBindings;
    }
View Full Code Here

TOP

Related Classes of javax.isolate.StreamBindings

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.