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

fr.sii.ogham.template.thymeleaf.resolver.StringResourceResolver Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package fr.sii.ogham.template.thymeleaf.resolver;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import org.thymeleaf.TemplateProcessingParameters;
import org.thymeleaf.resourceresolver.IResourceResolver;

public class StringResourceResolver implements IResourceResolver {

	private static final String NAME = "STRING";

	@Override
	public String getName() {
		return NAME;
	}

	@Override
	public InputStream getResourceAsStream(TemplateProcessingParameters templateProcessingParameters, String resourceName) {
		return new ByteArrayInputStream(resourceName.getBytes());
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy