public class MInformation extends MObject {
- public static final String MACACO_VERSION = "5.x";
-
- public static final String TEXT_ENCODING = "UTF-8";
-
/* Generic information. */
public static String getMacacoVersion() {
- return MInformation.MACACO_VERSION;
+ return MConstants.MACACO_VERSION;
}
public static String getMacacoFullName() {
package com.marcozanon.macaco.logging;
+import com.marcozanon.macaco.MConstants;
import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.text.MText;
import java.io.BufferedWriter;
//
this.file = file;
try {
- this.buffer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(this.getFile(), true), MInformation.TEXT_ENCODING));
+ this.buffer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(this.getFile(), true), MConstants.TEXT_ENCODING));
}
catch (FileNotFoundException exception) {
throw new MLoggingException("Could not open file.", exception);
package com.marcozanon.macaco.text;
+import com.marcozanon.macaco.MConstants;
import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.MObject;
import java.io.BufferedInputStream;
String text = x;
//
StringBuilder fakeXhtmlPageContent = new StringBuilder("");
- fakeXhtmlPageContent.append(String.format("<?xml version=\"1.0\" encoding=\"%s\" ?>", MInformation.TEXT_ENCODING));
+ fakeXhtmlPageContent.append(String.format("<?xml version=\"1.0\" encoding=\"%s\" ?>", MConstants.TEXT_ENCODING));
fakeXhtmlPageContent.append("<!DOCTYPE html SYSTEM \"fake-dtd\" >");
fakeXhtmlPageContent.append("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
fakeXhtmlPageContent.append("<head><title /></head>");
});
//
- reader.parse(new InputSource(new ByteArrayInputStream(fakeXhtmlPageContent.toString().getBytes(MInformation.TEXT_ENCODING))));
+ reader.parse(new InputSource(new ByteArrayInputStream(fakeXhtmlPageContent.toString().getBytes(MConstants.TEXT_ENCODING))));
}
catch (ParserConfigurationException exception) { // cannot happen
}
package com.marcozanon.macaco.text;
+import com.marcozanon.macaco.MConstants;
import com.marcozanon.macaco.MInformation;
import com.marcozanon.macaco.MObject;
import java.io.FileInputStream;
//
LineNumberReader buffer = null;
try {
- buffer = new LineNumberReader(new InputStreamReader(new FileInputStream(file), MInformation.TEXT_ENCODING));
+ buffer = new LineNumberReader(new InputStreamReader(new FileInputStream(file), MConstants.TEXT_ENCODING));
}
catch (FileNotFoundException exception) {
throw new MTranslationFileParsingException("Could not open file.", exception);