1

Does anyone know how to retrieve videos with type BLOB from database using Hibernate?

I saved the video using this:

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();

I didn't find so much documentation online about retrieving videos. So if you know a good method, please let me know

Juan Carlos Mendoza
  • 5,736
  • 7
  • 25
  • 50
Paul Buciuman
  • 325
  • 3
  • 10
  • 19

0 Answers0