Trida FileBean ma metodu |*getInputStream <http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/FileBean.html#getInputStream%28%29>*()| , z InputStreamu je mozne ziskat pole bytu pres metodu read, mam pocit ze nekde existuje nejaka util trida pro praci s input streamem ale nejsem si jisty

radovan deka wrote:
Ahoj, mam pokusnou aplikaci ktera pouziva Spring, Hibernate a Stripes. Ted 
nemuzu zjistit, jak ulozit uploadnuty soubor do databaze. Soubor uploaduju 
pomoci Stripes:

<stripes:form>
    ...
    <stripes:file name="newAttachment"/>
    ...
</stripes:form>

V ActionBeanu mam ten uploadnuty soubor typu "net.sourceforge.stripes.action.FileBean". Muzu na nem zavolat metodu save(File toFile) a soubor ulozit. Ale ja bych ho rad ukladal do databaze pomoci Hibernate. Nevim ale jak z toho FileBeanu udelat []byte, abych ho mohl ulozit jako typ "org.springframework.orm.hibernate3.support.BlobByteArrayType". Nebo jsem uplne mimo misu?
__________ Information from ESET Smart Security, version of virus signature 
database 2886 (20080219) __________

The message was checked by ESET Smart Security.

http://www.eset.com




Odpovedet emailem