jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes copying file into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "copying file into database" Watch "copying file into database" New topic

copying file into database

Monty Guppy
Ranch Hand

Joined: Sep 15, 2001
Posts: 49
This is the gist of what I am trying to do:
- I need to read a PDF file located on my machine through my java program.
- The PDF file needs to be then converted into a byte array
- The byte array then needs to be inserted into a (MS-SQL) table field (type=image)
- The PDF file then needs to be deleted from my machine
I am getting very confused with the different types of inputStreams, and how to use them.
Any help would be greatly appreciated.
Monty Guppy
Ranch Hand

Joined: Sep 15, 2001
Posts: 49
Brent Worden
Ranch Hand

Joined: Nov 26, 2001
Posts: 50

Brent Worden

Brent Worden
It is sorta covered in the JavaRanch Style Guide.
subject: copying file into database
Similar Threads
sending pdf file to client as byte array
wrting bytearray to xml file
help in converting pdf into byte array
File decorator for an input stream