Convert OutPutStreamWriter to ByteArrayOutPutStream

0

I'm trying to convert a OutputStreamWriter to a ByteArrayOutputStream

out = new OutputStreamWriter(new FileOutputStream("C:/Repositorio/agora-renewal-base/template/email.html"));

ByteArrayOutputStream templateStream = new ByteArrayOutputStream();

templateHtmlContent = templateStream != null ? IOUtils.toString(templateStream.toByteArray(), Charsets.UTF_8.toString()) : null; 

template.process(root, out);

How can I pass the variable out to ByteArrayOutputStream to convert it?

    
asked by charli 09.11.2018 в 10:30
source

0 answers