Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "copying file into database" Watch "copying file into database" New topic
Author

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
anyone?
Brent Worden
Ranch Hand

Joined: Nov 26, 2001
Posts: 50


------------------
Brent Worden
http://www.brent.worden.org/


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