How can I break the string on Java?
<p>I need to write strings into <code>ByteArrayOutputStream</code>, but I need to write strings with breaking. I have tried to do it as example:</p>

<pre><code>out.write("123".getBytes());
out.write("\n456".getBytes());
</code></pre>

<p>But '\n' doesn't work. Please, tell me, how can I fix it? Or suggest me alternative OutputStream for storing strings (this OS must allow to use breaking of lines) without making files. Thank you. </p>
