Results 1 to 12 of 12
Thread: plz help
- 10-08-2011, 07:48 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 5
- Rep Power
- 0
-
Re: plz help
Do not multipost the same question in the forum. Please re-read the forum rules that you agreed to on signing on.
You're in luck, a jar file is already bytes -- as is every other file on your computer. If this information doesn't help you, please consider supplying more detail on your problem. My link on how to ask smart questions below can give you suggestions on just what information you may wish to supply us with.
- 10-08-2011, 08:05 AM #3
Member
- Join Date
- Oct 2011
- Posts
- 5
- Rep Power
- 0
Re: plz help
wat if i want to save it in database ....fro tat i have to convert in to bytes ..so wat sort of streaming i should use ..plz supply a sample code :)
-
Re: plz help
Please avoid non-standard abbreviations when posting here, and for several reasons. For one, for many folks who read the forum and help in the forum, English is not their first or even second language, and so strange abbreviations may not be understandable by them. For another, programming is an exercise in precision. If you need help, it would be best if you communicated your problem (or solution) in as clear and precise a way as possible.
Regarding your question, why would you want to store a jar file in a database? Wouldn't you instead store data created by the jar file? This makes little sense. Otherwise if you need to store it, I guess you can do so as a BLOB, but it would seem a great waste to me. You are probably better off explaining your overall problem and not your planned code solution because it smells to me as if better solutions are available.
- 10-08-2011, 09:01 AM #5
Member
- Join Date
- Oct 2011
- Posts
- 33
- Rep Power
- 0
Re: plz help
Agree with Fubarable , never heard some one storing jar file in database , though know for images or any other resources which we save as BLOB using JDBC. its better to explain the problem you will get more idea and better solution based on experienced people here and that way you will learn better, copying code is not the best way to move ahead.
- 10-08-2011, 09:19 AM #6
Member
- Join Date
- Oct 2011
- Posts
- 5
- Rep Power
- 0
Re: plz help
.
there is always first time for every thing Mr.javin paul ...yes am using Image data type in database now i wanted to convert jarfile into bytes and insert it into database .....
basically i have a task to insert jar file in database nd retrive that jar file when i need to use it ..
- 10-08-2011, 09:53 AM #7
Senior Member
- Join Date
- Apr 2010
- Location
- Philippines
- Posts
- 580
- Rep Power
- 4
Re: plz help
Why not save the path of the jar file and not the jar file itself. You keep all those file in a folder and retrieve its path when you need it.
- 10-08-2011, 10:02 AM #8
Member
- Join Date
- Oct 2011
- Posts
- 33
- Rep Power
- 0
Re: plz help
Don't get it wrong Fubarable, but storing JAR file in database instead of file system doesn't go well to me , perhaps you are storing that to provide download link or anything else. Only way I could perceive is that using BLOB and converting JAR into Bytes by reading it from InputStream. you can use JarInputStream and JarOutputStream for reading from and writing to Jar files. look on java.util.jar package also.
Check this link also you might find discussion helpful for you:
JarFile/ZipFile from byte array without temp file
-
Re: plz help
- 10-08-2011, 10:05 AM #10
Member
- Join Date
- Oct 2011
- Posts
- 33
- Rep Power
- 0
Re: plz help
Nice suggestion, is there any Plus one button to promote this reply, I always like pointer like this which some how doesn't come in mind some time.
- 10-10-2011, 05:16 AM #11
Member
- Join Date
- May 2011
- Posts
- 35
- Rep Power
- 0
Re: plz help
I disagree with mine0926. If we are able to save jar files in database, why not?
Instead of storing it as path, we should store jar file inside database as this will ease further CRUD process.
Unless storing too many jar files in database will provide bottleneck somewhere, else I do not see any point why we should not store jar files in it.
Regards,
Jimmy.
- 10-10-2011, 07:38 AM #12
Member
- Join Date
- Oct 2011
- Posts
- 5
- Rep Power
- 0


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks