According to
this[
^] it is a JVM problem where the
<a href="http://www.docjar.com/html/api/java/io/DataOutputStream.java.html">DataOutputStream</a>[<a href="http://www.docjar.com/html/api/java/io/DataOutputStream.java.html" target="_blank" title="New Window">^</a>]
used to do some writing has a hard-coded limit of 65535 bytes.
Check the version of your JRE, post 1.6.09 should be okay.