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:
@@ -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)
|
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!");
|
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
|
||||||
|
|
||||||
{
|
{
|
||||||
static const char * cSignature = "()Z";
|
static const char * cSignature = "()Z";
|
||||||
static const char * cMethodName = "available";
|
static const char * cMethodName = "ready";
|
||||||
// Java-Call
|
// Java-Call
|
||||||
static jmethodID mID(NULL);
|
static jmethodID mID(NULL);
|
||||||
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
|
obtainMethodId_throwRuntime(t.pEnv, cMethodName,cSignature, mID);
|
||||||
out = t.pEnv->CallBooleanMethod( object, mID);
|
out = t.pEnv->CallBooleanMethod( object, mID);
|
||||||
ThrowRuntimeException(t.pEnv,*this);
|
ThrowRuntimeException(t.pEnv,*this);
|
||||||
} //t.pEnv
|
} //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)
|
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)
|
||||||
|
Reference in New Issue
Block a user