urgently help needed

hi,

my program basically download the file from the given url.

what i have to do is, i have to read the file into a byte array, and then depepnding on the content of file,which is in byte stream, open a content specific application there. like if the file is pdf, then my program should be able to open acrobat reader there and i am not allowed to store file anywhere in the hard-disk..

is there any solution for this?

thanks in advance..

[469 byte] By [sanjubiggiea] at [2007-11-27 0:26:36]
# 1
There is no common solution. You need to use specific API in each case. If you want to open pdf then you need to read about Acrobat API if you need to open doc file then you need to read about Office API etc.
Michael.Nazarov@sun.coma at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 2

thanks for replying..

there is some dll in windows, which when executed with java api

runtime.getruntime.exec("rund32 url.dll,fileprotocolhandler",+path)

open a content specific application..

can' t i run this API withy byte array...?

and regarding your reply.. do i need to implement contenthandlerfactory class in my program?

thanks

sanjubiggiea at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 3
How are you going to insert byte array into command line?
Michael.Nazarov@sun.coma at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 4
that is the biggest problem i am facing.. i am ready to write contenthandler for each content type but the thing is how to stream those byte array into corresponding application(acrobat,word) etc..
sanjubiggiea at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 5
I answered - using appropriate API if such API exists.
Michael.Nazarov@sun.coma at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 6

If you're not allowed to store the file locally (assuming the file isn't available on a network share or some such), you are SOOL, because not too many Windows applications accept byte streams on the command line.

P.S. please try to use a more descriptive subject line next time. Everyone needs help urgently...

Herko_ter_Horsta at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...
# 7
although i am not allowed to create file on disk because of security issue, like other can access it, do you have any idea, if i create temporary file and store it in disk.. and secure it appropriately..or delete it after initiating the corresponding application...
sanjubiggiea at 2007-7-11 22:25:18 > top of Java-index,Core,Core APIs...