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

nl.vpro.util.FileMetadata Maven / Gradle / Ivy

There is a newer version: 5.3.1
Show newest version
package nl.vpro.util;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.time.Instant;

/**
 * An abstract representation of a File, it can e.g. also be a file on a different server.
 *
 * @author Michiel Meeuwissen
 * @since 1.78
 */
@Data
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@lombok.Builder(builderClassName = "Builder")
public class FileMetadata {

    private final Long size;
    private final Instant lastModified;
    private final String fileName;

    @Override
    public String toString() {
        return fileName + " (" + size + " bytes) " + lastModified;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy