I very much assume this wants to call java.io.Reader.ready

...seeing that there is no java.io.Reader.available.  (And then, there's no good
way to map from java.io.Reader.ready's boolean value to
css.io.XInputStream.available's long value, so conservatively map true to 1.)

But I have no idea how to trigger this code.

Change-Id: I18d12e0d968141410a1b56e700ed544edceda97c
This commit is contained in:
Stephan Bergmann 2015-05-08 09:26:35 +02:00
parent fa54d73a59
commit c5e08b42ac

View File

@ -57,19 +57,19 @@ void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip ) throw(::com::s
sal_Int32 SAL_CALL java_io_Reader::available( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)
{
jboolean out(sal_False);
jboolean out;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
static const char * cSignature = "()Z";
static const char * cMethodName = "available";
static const char * cMethodName = "ready";
// Java-Call
static jmethodID mID(NULL);
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowRuntimeException(t.pEnv,*this);
} //t.pEnv
return out;
return out ? 1 : 0; // no way to tell *how much* is ready
}
void SAL_CALL java_io_Reader::closeInput( ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception)