protected override void Dispose(bool disposing) { if (disposing && BaseOutputStream != null) { BaseOutputStream.Dispose(); BaseOutputStream = null; } }
// // Exception audit: // // Verdict // Exception wrapping is required. // // Rationale // `java.io.OutputStream.close()` throws an exception, see: // // https://developer.android.com/reference/java/io/OutputStream?hl=en#close() // protected override void Dispose(bool disposing) { if (disposing && BaseOutputStream != null) { try { BaseOutputStream.Close(); BaseOutputStream.Dispose(); } catch (Java.IO.IOException ex) when(JNIEnv.ShouldWrapJavaException(ex)) { throw new IOException(ex.Message, ex); } } }