(Charset encoding)
| 36 | } |
| 37 | |
| 38 | public byte[] getBytes(Charset encoding) throws IOException { |
| 39 | try (ByteArrayOutputStream bout = new ByteArrayOutputStream(); PrintStream pout = new PrintStream(bout);) { |
| 40 | for (String line : lines) { |
| 41 | pout.println(line); |
| 42 | } |
| 43 | pout.flush(); |
| 44 | return bout.toByteArray(); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public Iterator<String> iterator() { |