equal
deleted
inserted
replaced
30 import java.io.OutputStreamWriter; |
30 import java.io.OutputStreamWriter; |
31 import java.io.Writer; |
31 import java.io.Writer; |
32 import java.nio.charset.Charset; |
32 import java.nio.charset.Charset; |
33 import java.nio.charset.CharsetEncoder; |
33 import java.nio.charset.CharsetEncoder; |
34 import com.sun.org.apache.xerces.internal.util.XMLChar; |
34 import com.sun.org.apache.xerces.internal.util.XMLChar; |
|
35 import com.sun.org.apache.xerces.internal.utils.SecuritySupport; |
35 |
36 |
36 /** |
37 /** |
37 * Implements common xml writer functions. |
38 * Implements common xml writer functions. |
38 * |
39 * |
39 * @author Neeraj Bajaj,K.Venugopal Sun Microsystems. |
40 * @author Neeraj Bajaj,K.Venugopal Sun Microsystems. |
238 writeXMLContent(value.toCharArray(), 0, value.length(), true); |
239 writeXMLContent(value.toCharArray(), 0, value.length(), true); |
239 } |
240 } |
240 |
241 |
241 private CharsetEncoder getDefaultEncoder(){ |
242 private CharsetEncoder getDefaultEncoder(){ |
242 try{ |
243 try{ |
243 String encoding = System.getProperty("file.encoding"); |
244 String encoding = SecuritySupport.getSystemProperty("file.encoding"); |
244 if(encoding != null){ |
245 if(encoding != null){ |
245 return Charset.forName(encoding).newEncoder(); |
246 return Charset.forName(encoding).newEncoder(); |
246 } |
247 } |
247 } |
248 } |
248 catch(Exception ex){ |
249 catch(Exception ex){ |