question: protected void newLine ( PrintWriter file , String string , boolean isManifest ) { String [ ] lines = string . split ( NEW_LINE ) ; for ( String line : lines ) { String [ ] words = line . split ( SPACE ) ; StringBuffer sb = new StringBuffer ( ) ; for ( String word : words ) { if ( checkStringLength ( sb . toString ( ) + word , isManifest ) ) { sb . append ( word + SPACE ) ; } else { sb . setLength ( sb . length ( ) - 1 ) ; addLine ( file , sb . toString ( ) ) ; sb = new StringBuffer ( word + SPACE ) ; } } if ( sb . length ( ) > 0 ) { sb . setLength ( sb . length ( ) - 1 ) ; } addLine ( file , sb . toString ( ) ) ; } }
target:  Writes a string to a file. Checks for string length, and will automatically wrap lines.