21 #ifndef jtie_tconv_string_impl_hpp
22 #define jtie_tconv_string_impl_hpp
27 #include "jtie_tconv_string.hpp"
28 #include "jtie_tconv_impl.hpp"
29 #include "helpers.hpp"
45 template<
typename J,
typename C >
50 template<
typename J,
typename C >
54 struct ParamStringT< jstring, const char * > {
56 convert(cstatus & s, jstring j, JNIEnv * env) {
57 TRACE(
"const char * ParamStringT.convert(cstatus &, jstring, JNIEnv *)");
61 const char * c = NULL;
70 c = env->GetStringUTFChars(j, NULL);
82 release(
const char * c, jstring j, JNIEnv * env) {
83 TRACE(
"void ParamStringT.release(const char *, jstring, JNIEnv *)");
89 env->ReleaseStringUTFChars(j, c);
95 struct ResultStringT< jstring, const char * > {
97 convert(
const char * c, JNIEnv * env) {
98 TRACE(
"jstring ResultStringT.convert(const char *, JNIEnv *)");
103 return env->NewStringUTF(c);
112 template<
typename C >
115 template<
typename C >
121 struct Param< jstring, const char * >
139 #endif // jtie_tconv_string_impl_hpp