| 1 |
package com.thaiopensource.xml.dtd.app; |
| 2 |
|
| 3 |
import java.io.BufferedWriter; |
| 4 |
import java.io.OutputStream; |
| 5 |
import java.io.OutputStreamWriter; |
| 6 |
import java.io.UnsupportedEncodingException; |
| 7 |
|
| 8 |
import com.thaiopensource.xml.out.XmlWriter; |
| 9 |
import com.thaiopensource.xml.out.CharRepertoire; |
| 10 |
import com.thaiopensource.xml.util.EncodingMap; |
| 11 |
|
| 12 |
public class XmlOutputStreamWriter extends XmlWriter { |
| 13 |
public XmlOutputStreamWriter(OutputStream out, String enc) |
| 14 |
throws UnsupportedEncodingException { |
| 15 |
this(EncodingMap.getJavaName(enc), out); |
| 16 |
} |
| 17 |
|
| 18 |
private XmlOutputStreamWriter(String jEnc, OutputStream out) |
| 19 |
throws UnsupportedEncodingException { |
| 20 |
super(new BufferedWriter(new OutputStreamWriter(out, jEnc)), |
| 21 |
CharRepertoire.getInstance(jEnc)); |
| 22 |
} |
| 23 |
} |