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

uk.co.mruoc.file.content.ContentLoader Maven / Gradle / Ivy

Go to download

Code library to easily load files and file from the classpath or file system file

There is a newer version: 7.0.4
Show newest version
package uk.co.mruoc.file.content;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ContentLoader {

    public static String loadContentFromFileSystem(String path) {
        final FileContentLoader loader = new FileSystemFileContentLoader();
        return loader.loadContent(path);
    }

    public static String loadContentFromClasspath(String path) {
        final FileContentLoader loader = new ClasspathFileContentLoader();
        return loader.loadContent(path);
    }

    public static String loadBase64EncodedContentFromFileSystem(String path) {
        final FileContentLoader loader = new FileSystemBase64FileContentLoader();
        return loader.loadContent(path);
    }

    public static String loadBase64EncodedContentFromClasspath(String path) {
        final FileContentLoader loader = new ClasspathBase64FileContentLoader();
        return loader.loadContent(path);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy