-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: byte[] instead of Blob
PostPosted: Thu Feb 28, 2008 11:27 am 
Newbie

Joined: Thu Feb 28, 2008 11:13 am
Posts: 1
Hi,

I'm migrating from Oracle to Hibernate/MySQL.

I had my Blob from where I get a BinaryOutputStream:

Code:
oracle.sql.BLOB blob =(oracle.sql.BLOB)dbRef.getBlob(0);
OutputStream os = blob.getBinaryOutputStream();
os.write(obj_Byte);
os.close();


Now, with Hibernate I get the blob field in a byte array:

Code:
byte[] blob = objEJB.getBlob();


How can I get the OutputStream?

Thanks a lot


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 11:57 am 
Senior
Senior

Joined: Fri Jun 01, 2007 12:41 pm
Posts: 121
User ByteArrayOutputStream(.write() method to write your byte[] into a file or any output.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.