File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed 
src/test/java/com/fasterxml/jackson/dataformat/xml/ser Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 22
33import  com .fasterxml .jackson .dataformat .xml .XmlMapper ;
44import  com .fasterxml .jackson .dataformat .xml .XmlTestBase ;
5+ import  com .fasterxml .jackson .dataformat .xml .XmlWriter ;
56
67import  java .io .IOException ;
78import  java .nio .charset .Charset ;
@@ -45,7 +46,8 @@ public void testBig5ObjectWriter() throws IOException
4546        stringBean .象形字  = "pictogram" ;
4647        XmlMapper  xmlMapper  = new  XmlMapper ();
4748        xmlMapper .configure (ToXmlGenerator .Feature .WRITE_XML_1_1 , true );
48-         byte [] xml  = xmlMapper .writer ().writeValueAsBytes (stringBean );
49+         XmlWriter  writer  = (XmlWriter ) xmlMapper .writer ();
50+         byte [] xml  = writer .writeValueAsBytes (stringBean , big5 );
4951        System .out .write (xml );
5052        System .out .println ();
5153    }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments