// create a new writer instance
if (charcode == null) {
charcode = DEFAULT_ENCODING;
}
if ("UTF-8".equalsIgnoreCase(charcode)) {
m_writer = new UTF8StreamWriter(uris);
} else if ("ISO-8859-1".equalsIgnoreCase(charcode)) {
m_writer = new ISO88591StreamWriter(uris);
} else {
throw new IllegalStateException("Unimplemented character encoding " + charcode);
}