public class RtfTemplate extends Object
Rtf.template( new FileInputStream("template.rtf) )
.inject( "ADDRESSLINE1", "tutego" )
.inject( "ADDRESSLINE2", bold("Sonsbeck") )
.out( FileOutputStream("out.rtf") );
Just use ASCII-keys.| Modifier and Type | Method and Description |
|---|---|
RtfTemplate |
inject(Map<String,Object> map)
Adds key/values pairs for a variable substitution.
|
RtfTemplate |
inject(String key,
Object value)
Adds a key/value pair for substitution.
|
String |
out()
Performs the variable transformation and returns the
transformed RTF document.
|
void |
out(OutputStream out)
Performs the variable transformation and writes the RTF document and send
the output to an
Appendable. |
public RtfTemplate inject(Map<String,Object> map)
map - Map with key/value pairs.this object.public RtfTemplate inject(String key, Object value)
String.valueOf(Object).key - Key.value - Value.this object.public String out()
public void out(OutputStream out)
Appendable. This method closes the Appendable
after writing if its of type Closeable.out - Destination of this RTF output.Copyright © 2010–2015 Tutego. All rights reserved.