Skip to content

Instantly share code, notes, and snippets.

@tomgullo
Created June 14, 2012 12:46
Show Gist options
  • Save tomgullo/2930053 to your computer and use it in GitHub Desktop.
Save tomgullo/2930053 to your computer and use it in GitHub Desktop.
get a clob from Oracle
def sb = new StringBuffer()
def c = e.THE_CLOB
if ( (int) c.length() ) {
def buffer = new char[length]
def r = c.getCharacterStream()
def count = 0
while ( (count = r.read(buffer) ) != -1 ) { sb.append(buffer) }
}
println sb.toString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment