This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need help to save .tar files in data base Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Need help to save .tar files in data base" Watch "Need help to save .tar files in data base" New topic
Author

Need help to save .tar files in data base

Apeksha Badagavi
Greenhorn

Joined: Jan 03, 2011
Posts: 3
I want to insert .tar files into the DB. Is there any option of directly doing it? Or any other approach to follow upon.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Sounds like you need a BLOB field. You may want to compress the files before storing them (maybe using GZIP).


Android appsImageJ pluginsJava web charts
Apeksha Badagavi
Greenhorn

Joined: Jan 03, 2011
Posts: 3
Is GZIP used to decompress the .tar files? Cause I have tried using Zip, but it didnt work on the .tar files.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
GZIP -just like ZIP- is a compression and decompression method. Both work fine for TARs if you do it right. TAR itself is not compressed, just archived. The Commons Compress library (http://commons.apache.org/compress/) has everything you need to make working with TARs as easy as working with ZIP/GZIP.
Apeksha Badagavi
Greenhorn

Joined: Jan 03, 2011
Posts: 3
Do you have a sample java code for this?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
What are you looking for that's not explained on the "Examples" page?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Need help to save .tar files in data base
 
Similar Threads
Tar a folder excluding pdf's
Java Servlet - Download Multiple files
Implement JAAS in Struts
Archiving files in UNIX
java API to extract ZIP, RAR and TAR files