title: Retrieve Video from MySQL database HIbernate
body: <p>Does anyone know how to retrieve videos with type BLOB from database using Hibernate? </p>
  
  <p>I saved the video using this:</p>
  
  <pre><code>File file = new File(videoFilePath);
  FileInputStream inputStream = new FileInputStream(file);
  Blob blob = Hibernate.getLobCreator(session)
          .createBlob(inputStream, file.length());
  course.setVideo(blob);
  session.save(course);
  blob.free();
  </code></pre>
  
  <p>I didn't find so much documentation online about retrieving videos. So if you know a good method, please let me know</p>