/// <exception cref="System.IO.IOException"></exception> protected internal override void DoSendFragment(byte[] buf, int off, int length, bool isDirect) { if (Out != null && Out.IsOpen() == false) { throw new IOException("DCERPC pipe is no longer open"); } if (In == null) { In = (SmbFileInputStream)Pipe.GetNamedPipeInputStream(); } if (Out == null) { Out = (SmbFileOutputStream)Pipe.GetNamedPipeOutputStream(); } if (isDirect) { Out.WriteDirect(buf, off, length, 1); return; } Out.Write(buf, off, length); }
public override void Write(byte[] buffer, int offset, int count) { if (mStream == null) { throw new ObjectDisposedException("SambaInputStream"); } try { int dummy = SmbOperations.WithRetries(() => { mStream.Write(buffer, offset, count); return(0); }); } catch (SmbException ex) { throw new System.IO.IOException(ex.Message, ex); } catch (Java.IO.IOException ex) { throw new System.IO.IOException(ex.Message, ex); } }