// if the incoming NClob is a wrapper, just pass along its BinaryStream
return (X) ( (NClobImplementer) value ).getUnderlyingStream();
}
else {
// otherwise we need to build a BinaryStream...
return (X) new CharacterStreamImpl( DataHelper.extractString( value.getCharacterStream() ) );
}
}
else if (NClob.class.isAssignableFrom( type )) {
final NClob nclob = WrappedNClob.class.isInstance( value )
? ( (WrappedNClob) value ).getWrappedNClob()