0

I'm attempting to code a Java program. Right now I'm in the process of trying to convert a file (could be any extension, mostly would be word docs and powerpoint presentations) to binary to be stored in a mySQL database, but not sure how to go about doing it.

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • 1
    Possible duplicate of [Java File to Binary Conversion](http://stackoverflow.com/questions/7119141/java-file-to-binary-conversion) – WQYeo Jan 29 '17 at 08:19
  • 2
    Generally speaking, storing binary objects in the database isn't highly recommended, it can degrade the performance of the database and blow out the size. Generally, you store a reference to the file within the local context instead – MadProgrammer Jan 29 '17 at 08:28
  • "convert a file to binary", files are already binary... – Mark Rotteveel Jan 29 '17 at 08:31

0 Answers0