All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mule.modules.ftpclient.RemoteFile Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package org.mule.modules.ftpclient;

import java.util.Date;

public class RemoteFile {
    private FtpFileType type;
    private final String name;
    private final long size;
    private final Date timestamp;

    public RemoteFile(FtpFileType type, String name, long size, Date timestamp) {
        this.type = type;
        this.name = name;
        this.size = size;
        this.timestamp = timestamp == null ? null : (Date) timestamp.clone();
    }

    /**
     * @return file type.
     */
    public FtpFileType getType() {
        return type;
    }

    /**
     * @return file name.
     */
    public String getName() {
        return name;
    }

    /**
     * @return file size in bytes
     */
    public long getSize() {
        return size;
    }

    /**
     * @return timestamp, may be null if not known
     */
    public Date getTimestamp() {
        return timestamp == null ? null : (Date) timestamp.clone();
    }

    /**
     *
     */
    @Override
    public String toString() {
        return "RemoteFile [name=" + name + ", type=" + type + ", size=" + size + ", timestamp=" + timestamp + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy