diff options
Diffstat (limited to 'jurt')
-rw-r--r-- | jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java | 10 | ||||
-rw-r--r-- | jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java | 12 |
2 files changed, 15 insertions, 7 deletions
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java index 48fea08bd216..7f65c3ba9c95 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionInputStream_Adapter.java @@ -46,7 +46,9 @@ class XConnectionInputStream_Adapter extends InputStream { try { len = _xConnection.read(_bytes, 1); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } if(DEBUG) System.err.println("#### " + getClass().getName() + " - one byte read:" + _bytes[0][0]); @@ -56,12 +58,12 @@ class XConnectionInputStream_Adapter extends InputStream { @Override public int read(byte[] b, int off, int len) throws IOException { -// byte bytes[][] = new byte[1][]; - try { len = _xConnection.read(_bytes, len - off); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } System.arraycopy(_bytes[0], 0, b, off, len); diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java index 954afe8df6a0..fe9707492335 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/XConnectionOutputStream_Adapter.java @@ -44,7 +44,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.write(_bytes); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } if(DEBUG) System.err.println("#### " + this.getClass() + " - one byte written:" + _bytes[0]); @@ -65,7 +67,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.write(bytes); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } } @@ -74,7 +78,9 @@ class XConnectionOutputStream_Adapter extends OutputStream { try { _xConnection.flush(); } catch(com.sun.star.io.IOException ioException) { - throw new IOException(ioException); + IOException ex = new IOException(ioException.getMessage()); + ex.initCause(ioException); + throw ex; } } } |