Package com.sshtools.j2ssh.io

Examples of com.sshtools.j2ssh.io.UnsignedInteger32


            }
        } else {
            throw new IOException("Cannot list children for this file object");
        }

        UnsignedInteger32 requestId = nextRequestId();
        SshFxpReadDir msg = new SshFxpReadDir(requestId, file.getHandle());
        sendMessage(msg);

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


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

     * @throws IOException
     */
    public synchronized SftpFile openDirectory(String path)
        throws IOException {
        String absolutePath = getAbsolutePath(path);
        UnsignedInteger32 requestId = nextRequestId();
        SubsystemMessage msg = new SshFxpOpenDir(requestId, absolutePath);
        sendMessage(msg);

        byte[] handle = getHandleResponse(requestId);
        requestId = nextRequestId();
View Full Code Here

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

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

        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

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.