Example #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && BaseOutputStream != null)
     {
         BaseOutputStream.Dispose();
         BaseOutputStream = null;
     }
 }
Example #2
0
 /// <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;
        }
Example #4
0
 //
 // 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);
         }
     }
 }
Example #5
0
 public OutputStreamInvoker(Java.IO.OutputStream stream)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public OutputStreamInvoker(Java.IO.OutputStream stream)
 {
     this.BaseOutputStream = stream;
 }
Example #7
0
 public static void write(this Java.IO.OutputStream stream, byte[] b, int off, int len)
 {
     stream.Write(b, off, len);
 }
Example #8
0
 public static void write(this Java.IO.OutputStream stream, byte[] b)
 {
     stream.Write(b);
 }
Example #9
0
 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;
 }