Link to home
Start Free TrialLog in
Avatar of u9707118
u9707118

asked on

create file from byte array

OK, I have an array of bytes that I have retrieved from my database (byte[]).

How do I convert these bytes into a file?

Many thanks.
ASKER CERTIFIED SOLUTION
Avatar of lhankins
lhankins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ
If you want to create something you can read from without making a file, do

InputStream in = new ByteArrayInputStream(myBytes);
Avatar of u9707118
u9707118

ASKER

Thanks,

Just what I wanted.  Sorry, took so long to give the points...didn't get a chance before I went on hols.

Cheers.