protected override void Dispose(bool disposing) { if (disposing && BaseOutputStream != null) { BaseOutputStream.Dispose(); BaseOutputStream = null; } }
/// <summary> /// Default ctor /// </summary> public JavaOutputStreamWrapper(JOutputStream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } this.stream = stream; }
public OutputStreamInvoker(Java.IO.OutputStream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } this.BaseOutputStream = stream; }
// // 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(); BaseOutputStream = null; } catch (Java.IO.IOException ex) when(JNIEnv.ShouldWrapJavaException(ex)) { throw new IOException(ex.Message, ex); } } }
public OutputStreamInvoker(Java.IO.OutputStream stream) { throw new NotImplementedException(); }
public OutputStreamInvoker(Java.IO.OutputStream stream) { this.BaseOutputStream = stream; }
public static void write(this Java.IO.OutputStream stream, byte[] b, int off, int len) { stream.Write(b, off, len); }
public static void write(this Java.IO.OutputStream stream, byte[] b) { stream.Write(b); }
public static void close(this Java.IO.OutputStream stream) { stream.Close(); }
/// <summary> /// Default ctor /// </summary> public JavaOutputStreamWrapper(JOutputStream stream) { if (stream == null) throw new ArgumentNullException("stream"); this.stream = stream; }