Package com.sshtools.j2ssh.io

Examples of com.sshtools.j2ssh.io.ByteArrayWriter.writeInt()


        log.debug("Changing terminal dimensions");

        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeInt(term.getColumns());
        baw.writeInt(term.getRows());
        baw.writeInt(term.getWidth());
        baw.writeInt(term.getHeight());
        connection.sendChannelRequest(this, "window-change", false,
            baw.toByteArray());
    }
View Full Code Here


        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeInt(term.getColumns());
        baw.writeInt(term.getRows());
        baw.writeInt(term.getWidth());
        baw.writeInt(term.getHeight());
        connection.sendChannelRequest(this, "window-change", false,
            baw.toByteArray());
    }

    /**
 
View Full Code Here

        }

        // This requests a pseudo terminal
        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(term);
        baw.writeInt(cols);
        baw.writeInt(rows);
        baw.writeInt(width);
        baw.writeInt(height);
        baw.writeString(terminalModes);
View Full Code Here

        // This requests a pseudo terminal
        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(term);
        baw.writeInt(cols);
        baw.writeInt(rows);
        baw.writeInt(width);
        baw.writeInt(height);
        baw.writeString(terminalModes);

        return connection.sendChannelRequest(this, "pty-req", true,
View Full Code Here

        // This requests a pseudo terminal
        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(term);
        baw.writeInt(cols);
        baw.writeInt(rows);
        baw.writeInt(width);
        baw.writeInt(height);
        baw.writeString(terminalModes);

        return connection.sendChannelRequest(this, "pty-req", true,
            baw.toByteArray());
View Full Code Here

        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(term);
        baw.writeInt(cols);
        baw.writeInt(rows);
        baw.writeInt(width);
        baw.writeInt(height);
        baw.writeString(terminalModes);

        return connection.sendChannelRequest(this, "pty-req", true,
            baw.toByteArray());
    }
View Full Code Here

                "X11 forwarding hasn't been enabled.");
        }

        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(x11ForwardingConfiguration.getAddressToBind());
        baw.writeInt(x11ForwardingConfiguration.getPortToBind());
        x11ForwardingConfiguration.getState().setValue(StartStopState.STARTED);

        if (log.isDebugEnabled()) {
            log.info("X11 forwarding started");
            log.debug("Address to bind: " +
View Full Code Here

        }

        ForwardingConfiguration config = (ForwardingConfiguration) remoteForwardings.get(name);
        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(config.getAddressToBind());
        baw.writeInt(config.getPortToBind());
        connection.sendGlobalRequest(REMOTE_FORWARD_REQUEST, true,
            baw.toByteArray());
        remoteForwardings.put(name, config);
        config.getState().setValue(StartStopState.STARTED);
        log.info("Remote forwarding configuration '" + name + "' started");
View Full Code Here

        }

        ForwardingConfiguration config = (ForwardingConfiguration) remoteForwardings.get(name);
        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeString(config.getAddressToBind());
        baw.writeInt(config.getPortToBind());
        connection.sendGlobalRequest(REMOTE_FORWARD_CANCEL_REQUEST, true,
            baw.toByteArray());
        config.getState().setValue(StartStopState.STOPPED);
        log.info("Remote forwarding configuration '" + name + "' stopped");
    }
View Full Code Here

     */
    public byte[] getChannelOpenData() {
        try {
            ByteArrayWriter baw = new ByteArrayWriter();
            baw.writeString(hostToConnectOrBind);
            baw.writeInt(portToConnectOrBind);
            baw.writeString(originatingHost);
            baw.writeInt(originatingPort);

            return baw.toByteArray();
        } catch (IOException ioe) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.