// // Exception audit: // // Verdict // Exception wrapping is required. // // Rationale // `java.io.OutputStream.write(byte[],int,int)` throws an exception, see: // // https://developer.android.com/reference/java/io/OutputStream?hl=en#write(byte%5B%5D) // public override void Write(byte[] buffer, int offset, int count) { try { BaseOutputStream.Write(buffer, offset, count); } catch (Java.IO.IOException ex) when(JNIEnv.ShouldWrapJavaException(ex)) { throw new IOException(ex.Message, ex); } }
/// <summary> /// Write a sequence of bytes to this stream and advance the position of this stream. /// </summary> /// <param name="buffer">Destination</param> /// <param name="offset">Offset within the buffer</param> /// <param name="count">Number of bytes to write.</param> public override void Write(byte[] buffer, int offset, int count) { stream.Write(buffer, offset, count); position += count; }
public static void write(this Java.IO.OutputStream stream, byte[] b, int off, int len) { stream.Write(b, off, len); }
public override void Write(byte[] buffer, int offset, int count) { BaseOutputStream.Write(buffer, offset, count); }
public static void write(this Java.IO.OutputStream stream, byte[] b) { stream.Write(b); }