code: @Override
      public InputStream openInputStream() throws IOException {
          if (outputStream != null) {
              return new ByteArrayInputStream(outputStream.toByteArray());
          } else {
              return new ByteArrayInputStream(new byte[0]);
          }
      }
docs: Opens an input stream to the file data.  If the file has never
  been written the input stream will contain no data (i.e. length=0).
  
  @return an input stream.
  
  @throws IOException if an I/O error occurs.