title: org.apache.commons.fileupload.disk.DiskFileItem is not created properly?
body: <p>I am trying to use the code shown in the following example:</p>
  
  <p><a href="https://stackoverflow.com/questions/4120635/java-lang-nullpointerexception-while-creating-diskfileitem">java.lang.NullPointerException while creating DiskFileItem</a></p>
  
  <p>My Test method contains the following code:</p>
  
  <pre><code>final File TEST_FILE = new File("C:/my_text.txt");
  final DiskFileItem diskFileItem = new DiskFileItem("fileData", "text/plain", true, TEST_FILE.getName(), 100000000, TEST_FILE.getParentFile());
  diskFileItem.getOutputStream();
  
  System.out.println("diskFileItem.getString() = " + diskFileItem.getString());
  </code></pre>
  
  <p>The text file exists in this location but the last line in the above code does not output the file content.</p>
  
  <p><strong>Any idea why?</strong></p>
  
  <p><strong>N.B.</strong></p>
  
  <p>The following does print the file content:</p>
  
  <pre><code>BufferedReader input =  new BufferedReader(new FileReader(TEST_FILE));
  String line = null;
  while (( line = input.readLine()) != null){
      System.out.println(line);
  }
  </code></pre>