Package com.sshtools.j2ssh.io

Examples of com.sshtools.j2ssh.io.UnsignedInteger32


        ByteArrayWriter baw = new ByteArrayWriter();
        baw.writeBoolean(false);
        baw.writeString("MIT-MAGIC-COOKIE-1");
        baw.writeString(cookie);
        baw.writeUINT32(new UnsignedInteger32(String.valueOf(display)));

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


     *
     * @throws IOException
     */
    public synchronized void renameFile(String oldpath, String newpath)
        throws IOException {
        UnsignedInteger32 requestId = nextRequestId();
        SshFxpRename msg = new SshFxpRename(requestId, oldpath, newpath);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
View Full Code Here

        if ((data.length - off) < len) {
            throw new IOException("Incorrect data array size!");
        }

        UnsignedInteger32 requestId = nextRequestId();
        SshFxpWrite msg = new SshFxpWrite(requestId, handle, offset, data, off,
                len);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
View Full Code Here

     *
     * @throws IOException
     */
    public synchronized void createSymbolicLink(String targetpath,
        String linkpath) throws IOException {
        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpSymlink(requestId, targetpath, linkpath);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
View Full Code Here

     *
     * @throws IOException
     */
    public synchronized String getSymbolicLinkTarget(String linkpath)
        throws IOException {
        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpReadlink(requestId, linkpath);
        sendMessage(msg);

        try {
            SubsystemMessage reply = messageStore.getMessage(requestId);
View Full Code Here

     *
     * @throws IOException
     */
    public synchronized void setAttributes(String path, FileAttributes attrs)
        throws IOException {
        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpSetStat(requestId, path, attrs);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
View Full Code Here

        throws IOException {
        if (!isValidHandle(file.getHandle())) {
            throw new IOException("The handle is not an open file handle!");
        }

        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpFSetStat(requestId, file.getHandle(),
                attrs);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
View Full Code Here

     * @throws IOException
     */
    public void changePermissions(SftpFile file, int permissions)
        throws IOException {
        FileAttributes attrs = new FileAttributes(); //file.getAttributes();
        attrs.setPermissions(new UnsignedInteger32(permissions));
        setAttributes(file, attrs);
    }
View Full Code Here

     * @throws IOException
     */
    public void changePermissions(String filename, int permissions)
        throws IOException {
        FileAttributes attrs = new FileAttributes();
        attrs.setPermissions(new UnsignedInteger32(permissions));
        setAttributes(filename, attrs);
    }
View Full Code Here

        if (!startSubsystem()) {
            return false;
        }

        boolean result = false;
        SshFxpInit msg = new SshFxpInit(new UnsignedInteger32(version), null);
        sendMessage(msg);

        // Lets give the sftp subsystem 30 seconds to reply
        SubsystemMessage reply = null;
View Full Code Here

TOP

Related Classes of com.sshtools.j2ssh.io.UnsignedInteger32

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.