24#include <osl/diagnose.h>
31jclass java_sql_Clob::theClass =
nullptr;
33java_sql_Clob::java_sql_Clob( JNIEnv * pEnv, jobject myObj )
58 static const char *
const cSignature =
"()J";
59 static const char *
const cMethodName =
"length";
61 static jmethodID mID(
nullptr);
63 out =
t.pEnv->CallLongMethod(
object, mID );
66 return static_cast<sal_Int64
>(out);
75 static const char *
const cSignature =
"(JI)Ljava/lang/String;";
76 static const char *
const cMethodName =
"getSubString";
78 static jmethodID mID(
nullptr);
80 jstring out =
static_cast<jstring
>(
t.pEnv->CallObjectMethod(
object, mID,
pos,subStringLength));
91 static jmethodID mID(
nullptr);
92 jobject out =
callObjectMethod(
t.pEnv,
"getCharacterStream",
"()Ljava/io/Reader;", mID);
108 static const char *
const cSignature =
"(Ljava/lang/String;I)J";
109 static const char *
const cMethodName =
"position";
111 static jmethodID mID(
nullptr);
113 out =
t.pEnv->CallLongMethod(
object, mID,
args[0].l,
start );
115 t.pEnv->DeleteLocalRef(
static_cast<jstring
>(
args[0].l));
117 return static_cast<sal_Int64
>(out);
jobject callObjectMethod(JNIEnv *pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
static void ThrowSQLException(JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
static jclass findMyClass(const char *_pClassName)
void obtainMethodId_throwSQL(JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
virtual ~java_sql_Clob() override
virtual OUString SAL_CALL getSubString(sal_Int64 pos, sal_Int32 length) override
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getCharacterStream() override
virtual sal_Int64 SAL_CALL position(const OUString &searchstr, sal_Int32 start) override
virtual sal_Int64 SAL_CALL positionOfClob(const css::uno::Reference< css::sdbc::XClob > &pattern, sal_Int64 start) override
virtual sal_Int64 SAL_CALL length() override
virtual jclass getMyClass() const override
OUString JavaString2String(JNIEnv *pEnv, jstring Str)
jstring convertwchar_tToJavaString(JNIEnv *pEnv, const OUString &Temp)