23#include <com/sun/star/io/BufferSizeExceededException.hpp>
25#include <osl/diagnose.h>
31#if OSL_DEBUG_LEVEL > 0
32#define THROW_WHERE SAL_WHERE
41jclass java_io_InputStream::theClass =
nullptr;
42java_io_InputStream::java_io_InputStream( JNIEnv * pEnv, jobject myObj )
68 static jmethodID mID(
nullptr);
74 static jmethodID mID(
nullptr);
80 static jmethodID mID(
nullptr);
87 throw css::io::BufferSizeExceededException(
THROW_WHERE, *
this );
93 jbyteArray pByteArray =
t.pEnv->NewByteArray(nBytesToRead);
94 static const char *
const cSignature =
"([BII)I";
95 static const char *
const cMethodName =
"read";
97 static jmethodID mID(
nullptr);
99 out =
t.pEnv->CallIntMethod(
object, mID, pByteArray, 0, nBytesToRead );
105 aData.realloc ( out );
106 memcpy(
aData.getArray(),
t.pEnv->GetByteArrayElements(pByteArray,&
p),out);
108 t.pEnv->DeleteLocalRef(pByteArray);
sal_Int32 callIntMethod_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID) const
static jclass findMyClass(const char *_pClassName)
void obtainMethodId_throwRuntime(JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
static void ThrowRuntimeException(JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
void callVoidMethod_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID) const
sal_Int32 callIntMethodWithIntArg_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
constexpr OUStringLiteral aData