Package org.jnode.shell.io

Examples of org.jnode.shell.io.CommandIO


    private void createPipes() throws ShellFailureException {
        try {
            for (PipelineStage stage : stages) {
                for (CommandIOHolder holder : stage.holders) {
                    CommandIO io = holder.getIO();
                    if (io instanceof CommandIOMarker) {
                        CommandIOMarker marker = (CommandIOMarker) io;
                        String name = marker.getName();

                        if (name.startsWith("PIPE-")) {
View Full Code Here


        return token;
    }

    private int runCommand(CommandShell shell, CommandDescriptor desc)
        throws ShellException {
        CommandIO in = CommandLine.DEFAULT_STDIN;
        CommandIO out = CommandLine.DEFAULT_STDOUT;
        CommandIO err = CommandLine.DEFAULT_STDERR;
        try {
            try {
                if (desc.fromFileName != null) {
                    in = new CommandInput(new FileInputStream(desc.fromFileName.text));
                }
View Full Code Here

            // Create all the threads for the pipeline, wiring up their input
            // and output streams.
            int stageNo = 0;
            PipedOutputStream pipeOut = null;
            for (CommandDescriptor desc : descs) {
                CommandIO in = CommandLine.DEFAULT_STDIN;
                CommandIO out = CommandLine.DEFAULT_STDOUT;
                CommandIO err = CommandLine.DEFAULT_STDERR;
                desc.openedStreams = new ArrayList<CommandIO>(2);
                try {
                    // redirect from
                    if (desc.fromFileName != null) {
                        in = new CommandInput(new FileInputStream(desc.fromFileName.text));
View Full Code Here

            ios[i] = resolveStream(ios[i]);
        }
    }

    public PrintStream resolvePrintStream(CommandIO io) {
        CommandIO tmp = resolveStream(io);
        return ((CommandOutput) tmp).getPrintStream();
    }
View Full Code Here

        CommandIO tmp = resolveStream(io);
        return ((CommandOutput) tmp).getPrintStream();
    }

    public InputStream resolveInputStream(CommandIO io) {
        CommandIO tmp = resolveStream(io);
        return ((CommandInput) tmp).getInputStream();
    }
View Full Code Here

TOP

Related Classes of org.jnode.shell.io.CommandIO

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.