title: Writing to a new Blob in Java
body: <p>I want to be able to create a new Blob object and then write to it. Originally, my general plan for this was as follows:</p>
  
  <p>Create a new blob (null, because there's no Blob constructor)
  Create a new OutputStream and set it to blob.setBinaryStream(0)
  Write to the output stream. </p>
  
  <p>However, I get a NullPointerException when I try to execute this code. Is there a different way I should be going about this? Any help would be appreciated. </p>
  
  <p>Thanks!</p>
  
  <p>~B</p>