summaryrefslogblamecommitdiffstats
path: root/src/main/java/org/openslx/satserver/util/Template.java
blob: 593eea9dd7d454497fea15ed8ac6c643ace5d47f (plain) (tree)
1
2
3
4
5



                                   
                                         









                                                                 
                                                                                                          













                                                                       
package org.openslx.satserver.util;

import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

import org.apache.commons.io.FileUtils;

public class Template
{

	private String content;
	
	public Template(final String filename) throws IOException
	{
		this.content = FileUtils.readFileToString( new File( filename ), StandardCharsets.UTF_8 );
	}
	
	public void replace(final String search, final String replace)
	{
		this.content = this.content.replace( search, replace );
	}
	
	@Override
	public String toString()
	{
		return this.content;
	}
	
}