X-Git-Url: https://git.hedgecode.org/?p=hespiff.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fhedgecode%2Fxml%2Fxspf%2FXMLBindPlaylist.java;h=d554207b3cdfeb7b83fc1c66d13a9b92c1a6a50c;hp=0ae5a5cc954ab7343a97bf4f513d3ab8c5ec9a75;hb=d50a7fa6952079a2685cf740cf221b69a4e5fafa;hpb=ad6e6a2426c97aa14868d9bd2d279efc84c890d8 diff --git a/src/main/java/org/hedgecode/xml/xspf/XMLBindPlaylist.java b/src/main/java/org/hedgecode/xml/xspf/XMLBindPlaylist.java index 0ae5a5c..d554207 100644 --- a/src/main/java/org/hedgecode/xml/xspf/XMLBindPlaylist.java +++ b/src/main/java/org/hedgecode/xml/xspf/XMLBindPlaylist.java @@ -166,9 +166,7 @@ public class XMLBindPlaylist extends AbstractXMLBindElement implements Playlist public String getAsString() throws JAXBException, UnsupportedEncodingException { - Charset charset = (Charset) Properties.getProperty( - Properties.CHARSET, Charset.class - ); + Charset charset = XSPFProperties.getCharset(); ByteArrayOutputStream os = (ByteArrayOutputStream) getAsStream(); return os.toString( charset.name() @@ -178,17 +176,16 @@ public class XMLBindPlaylist extends AbstractXMLBindElement implements Playlist private Marshaller createMarshaller(Class xmlRootClass) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(xmlRootClass); Marshaller marshaller = jaxbContext.createMarshaller(); - Charset charset = (Charset) Properties.getProperty(Properties.CHARSET, Charset.class); + Charset charset = XSPFProperties.getCharset(); marshaller.setProperty( Marshaller.JAXB_ENCODING, charset.name() ); marshaller.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, - Properties.getProperty(Properties.FORMATTED, Boolean.class) + XSPFProperties.getBoolean(XSPFProperties.FORMATTED) ); - Object standalone = Properties.getProperty(Properties.STANDALONE, Boolean.class); - if (Boolean.FALSE.equals(standalone)) { + if (Boolean.FALSE.equals(XSPFProperties.getBoolean(XSPFProperties.STANDALONE))) { marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); marshaller.setProperty( XSPFConstants.XML_HEADER_NAME,