Rev 545 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 545 | Rev 801 | ||
|---|---|---|---|
| Line 3... | Line 3... | ||
| 3 | import java.io.ByteArrayInputStream; |
3 | import java.io.ByteArrayInputStream; |
| 4 | import java.io.ByteArrayOutputStream; |
4 | import java.io.ByteArrayOutputStream; |
| 5 | import java.io.IOException; |
5 | import java.io.IOException; |
| 6 | import java.io.Serializable; |
6 | import java.io.Serializable; |
| 7 | import java.io.StringReader; |
7 | import java.io.StringReader; |
| - | 8 | import java.nio.charset.StandardCharsets; |
|
| 8 | import java.util.Date; |
9 | import java.util.Date; |
| 9 | import java.util.List; |
10 | import java.util.List; |
| 10 | 11 | ||
| 11 | import javax.persistence.Column; |
12 | import javax.persistence.Column; |
| 12 | import javax.persistence.Entity; |
13 | import javax.persistence.Entity; |
| Line 466... | Line 467... | ||
| 466 | @Transient |
467 | @Transient |
| 467 | public byte[] criarArquivoXml() { |
468 | public byte[] criarArquivoXml() { |
| 468 | ByteArrayInputStream in = null; |
469 | ByteArrayInputStream in = null; |
| 469 | ByteArrayOutputStream bos = null; |
470 | ByteArrayOutputStream bos = null; |
| 470 | try { |
471 | try { |
| 471 | in = new ByteArrayInputStream(getTextoXml().getBytes()); |
- | |
| - | 472 | in = new ByteArrayInputStream(getTextoXml().getBytes(StandardCharsets.UTF_8)); |
|
| 472 | DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
473 | DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| 473 | DocumentBuilder builder = dbf.newDocumentBuilder(); |
474 | DocumentBuilder builder = dbf.newDocumentBuilder(); |
| 474 | Document xml = builder.parse(in); |
475 | Document xml = builder.parse(in); |
| 475 | 476 | ||
| 476 | bos = new ByteArrayOutputStream(); |
477 | bos = new ByteArrayOutputStream(); |