As you cannot just add more charachters to a regular String in Java. You should use the StringBuffer to do this.
You can loop through the String with a for loop and then so something after every 100th character:
String string = "Some long string ...";
StringBuffer buffer = new StringBuffer();
for(int i = 0; i < string.length(); i++) {
// Append a \n after every 100th character.
if((i > 0) && (i % 100) == 0) {
buffer.append("\n");
}
// Just adds the next character to the StringBuffer.
buffer.append(string.charAt(i));
}
String parsedString = buffer.toString();