You could do sth. like 
```JAVA
      content.replace("&","&amp;")
          .replace("<",   "&lt;")
          .replace(">",   "&gt;")
          .replace("\"",  "&quot;")
          .replace("'",   "&apos;");
```
But for the ranges below UNICODE_LOW and UNICODE_HIGH you'd still have to StringBuilder. Besides that the StringBuilder approach is slightly more efficient (not creating 5 new Strings as replace does). 
Did some changes in the new commit - keeping performance and increasing readability.