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()
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,