Changeset 6621


Ignore:
Timestamp:
09/30/15 11:56:54 (9 years ago)
Author:
davor.ostojic@oeaw.ac.at
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.3-oeaw/vlo-vocabularies/src/main/java/eu/clarin/cmdi/vlo/transformers/VariantsMapMarshaller.java

    r6620 r6621  
    22
    33import java.io.InputStream;
     4import java.io.InputStreamReader;
    45import java.io.OutputStream;
    56import java.io.OutputStreamWriter;
     7import java.io.Reader;
    68import java.io.UnsupportedEncodingException;
    79import java.io.Writer;
     
    2325       
    2426    public static VariantsMap unmarshal(InputStream input)throws JAXBException{
     27        Reader in = new InputStreamReader(input, StandardCharsets.ISO_8859_1);
     28       
    2529        JAXBContext jc = JAXBContext.newInstance(VariantsMap.class);
    2630        Unmarshaller unmarshaller = jc.createUnmarshaller();
    27         return (VariantsMap) unmarshaller.unmarshal(input);       
     31        return (VariantsMap) unmarshaller.unmarshal(in);       
    2832       
    2933    }
     
    3135   
    3236    public static void marshal(VariantsMap map, OutputStream output) throws JAXBException, UnsupportedEncodingException{
    33        
     37        Writer out = new OutputStreamWriter(output, StandardCharsets.UTF_8);
     38
    3439        JAXBContext jc = JAXBContext.newInstance(VariantsMap.class);
    35         Writer out = new OutputStreamWriter(output, "UTF8");
    36        
    3740        Marshaller marshaller = jc.createMarshaller();
    3841        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
Note: See TracChangeset for help on using the changeset viewer.