emmanuel wrote:
and How should I map an inputstream partially read by the user application?
Try to implement a user type (@Type), this might work in your particular case.
Well, perhaps...as a simple default,
On the way into the DB, the user is responsible for keeping that inputstream live and valid and Hibernate will just read from the stream until there is no more data. Sure, there is the problem of resetting and be able to repeatedly read from that InputStream, but as a default, just assume a one-time read and process deal.
On the way out, just back it with a ByteArrayOutputstream.
I'll look at user type. Thanks...