 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.collectable;
22 import java.io.BufferedWriter;
24 import java.io.FileOutputStream;
25 import java.io.IOException;
26 import java.io.OutputStreamWriter;
27 import java.io.Writer;
28 import java.util.Map.Entry;
32 import net.
sf.japi.swing.misc.Progress;
33 import org.jetbrains.annotations.NotNull;
66 public void collect(@NotNull
final Progress progress, @NotNull
final File collectedDirectory)
throws IOException {
67 try (FileOutputStream fos =
new FileOutputStream(
new File(collectedDirectory,
smoothFile))) {
69 try (Writer out =
new BufferedWriter(osw)) {
70 out.append(
"default_smoothed.111 sdefault.001\n");
71 for (
final Entry<String, SmoothFace> e :
smoothFaces) {
73 out.append(smoothFace.
getFace()).append(
' ').append(smoothFace.
getValue()).append(
'\n');
Smoothing information for one face name.
Base package of all Gridarta classes.
A Collectable has information that can be collected.
final SmoothFaces smoothFaces
The SmoothFaces being collected.
final String smoothFile
The smooth file to write to.
A Collectable that creates the Crossfire specific smooth faces file.
String getValue()
Returns the smooth information.
void collect(@NotNull final Progress progress, @NotNull final File collectedDirectory)
Collects information.
Collection of all smoothing information.
Utility-class for Gridarta's I/O.
SmoothFacesCollectable(@NotNull final SmoothFaces smoothFaces, @NotNull final String smoothFile)
Creates a new instance.
String getFace()
Returns the smoothed face.
static final String MAP_ENCODING
Encoding to use for maps and other data.