uk.co.mruoc.file.content.Base64FileContentLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of file-loader Show documentation
Show all versions of file-loader Show documentation
Code library to easily load files and file from the classpath or file system file
The newest version!
package uk.co.mruoc.file.content;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RequiredArgsConstructor
public class Base64FileContentLoader implements FileContentLoader {
private final Base64Encoder base64Encoder = new Base64Encoder();
private final FileContentLoader contentLoader;
@Override
public String loadContent(String path) {
String content = contentLoader.loadContent(path);
String base64 = base64Encoder.encode(content);
log.debug("converted content {} into base64 {}", content, base64);
return base64;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy