Guest User

Why I cannot cast oracle BLOB from native java Blob

a guest
Feb 27th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. ...
  2. ResultSet rs = ...
  3. java.sql.Blob myfile = rs.getBlob("field")
  4. java.io.OutputStream os = ((oracle.sql.BLOB) myfile).getBinaryOutputStream();
  5.  
  6. java.lang.ClassCastException
  7.  
  8. java.io.OutputStream os = ((oracle.sql.BLOB) myBlob).setBinaryStream(1L);
Add Comment
Please, Sign In to add comment