Presizing the StringWriter is optional, but improves performance. Here I assumed that the file encoding was one byte per character. If that's not the case you may wish to presize differently - e.g. for UTF-16 use
"I'm not back." - Bill Harding, Twister
subject: Is there an efficient way to read a text file into a string?