Package com.sshtools.j2ssh.io

Examples of com.sshtools.j2ssh.io.UnsignedInteger32


        FileAttributes attrs) throws IOException {
        if (attrs == null) {
            attrs = new FileAttributes();
        }

        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpOpen(requestId, absolutePath,
                new UnsignedInteger32(flags), attrs);
        sendMessage(msg);

        byte[] handle = getHandleResponse(requestId);
        SftpFile file = new SftpFile(absolutePath, null);
        file.setHandle(handle);
View Full Code Here


     * @throws IOException
     */
    public synchronized FileAttributes getAttributes(String path)
        throws IOException {
        SubsystemMessage msg;
        UnsignedInteger32 requestId = nextRequestId();
        msg = new SshFxpStat(requestId, path);
        sendMessage(msg);

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

     * @throws IOException
     */
    public synchronized FileAttributes getAttributes(SftpFile file)
        throws IOException {
        SubsystemMessage msg;
        UnsignedInteger32 requestId = nextRequestId();

        if (!isValidHandle(file.getHandle())) {
            msg = new SshFxpStat(requestId, file.getAbsolutePath());
        } else {
            msg = new SshFxpFStat(requestId, file.getHandle());
View Full Code Here

        if ((output.length - off) < len) {
            throw new IOException(
                "Output array size is smaller than read length!");
        }

        UnsignedInteger32 requestId = nextRequestId();
        SshFxpRead msg = new SshFxpRead(requestId, handle, offset,
                new UnsignedInteger32(len));
        sendMessage(msg);

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

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

     *
     * @throws IOException
     */
    public synchronized void removeFile(String filename)
        throws IOException {
        UnsignedInteger32 requestId = nextRequestId();
        SshFxpRemove msg = new SshFxpRemove(requestId, filename);
        sendMessage(msg);
        getOKRequestStatus(requestId);
    }
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

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.