C# Class SharpCifs.Smb.SmbFileOutputStream

This OutputStream can write bytes to a file on an SMB file server.
This OutputStream can write bytes to a file on an SMB file server.
Inheritance: SharpCifs.Util.Sharpen.OutputStream
Exibir arquivo Open project: brandonprry/Potato Class Usage Examples

Public Methods

Method Description
Close ( ) : void

Closes this output stream and releases any system resources associated with it.

Closes this output stream and releases any system resources associated with it.

IsOpen ( ) : bool
SmbFileOutputStream ( SmbFile file ) : System.IO

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server represented by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

SmbFileOutputStream ( SmbFile file, bool append ) : System.IO

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.

SmbFileOutputStream ( string url ) : System.IO

Creates an System.IO.OutputStream for writing to a file on an SMB server addressed by the URL parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

SmbFileOutputStream ( string url, bool append ) : System.IO

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the URL parameter. See SmbFile for a detailed description and examples of the smb URL syntax. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.

SmbFileOutputStream ( string url, int shareAccess ) : System.IO

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

The second parameter specifies how the file should be shared. If SmbFile.FILE_NO_SHARE is specified the client will have exclusive access to the file. An additional open command from jCIFS or another application will fail with the "file is being accessed by another process" error. The FILE_SHARE_READ, FILE_SHARE_WRITE, and FILE_SHARE_DELETE may be combined with the bitwise OR '|' to specify that other peocesses may read, write, and/or delete the file while the jCIFS user has the file open.

Write ( byte b ) : void

Writes b.length bytes from the specified byte array to this file output stream.

Writes b.length bytes from the specified byte array to this file output stream.

Write ( byte b, int off, int len ) : void

Writes len bytes from the specified byte array starting at offset off to this file output stream.

Writes len bytes from the specified byte array starting at offset off to this file output stream.

Write ( int b ) : void

Writes the specified byte to this file output stream.

Writes the specified byte to this file output stream.

WriteDirect ( byte b, int off, int len, int flags ) : void

Just bypasses TransWaitNamedPipe - used by DCERPC bind.

Just bypasses TransWaitNamedPipe - used by DCERPC bind.

Private Methods

Method Description
EnsureOpen ( ) : void
SmbFileOutputStream ( SmbFile file, bool append, int openFlags ) : System.IO

Method Details

Close() public method

Closes this output stream and releases any system resources associated with it.
Closes this output stream and releases any system resources associated with it.
if a network error occurs
public Close ( ) : void
return void

IsOpen() public method

public IsOpen ( ) : bool
return bool

SmbFileOutputStream() public method

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server represented by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.
public SmbFileOutputStream ( SmbFile file ) : System.IO
file SmbFile An SmbFile specifying the file to write to
return System.IO

SmbFileOutputStream() public method

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.
public SmbFileOutputStream ( SmbFile file, bool append ) : System.IO
file SmbFile An SmbFile representing the file to write to
append bool Append to the end of file
return System.IO

SmbFileOutputStream() public method

Creates an System.IO.OutputStream for writing to a file on an SMB server addressed by the URL parameter. See SmbFile for a detailed description and examples of the smb URL syntax.
public SmbFileOutputStream ( string url ) : System.IO
url string An smb URL string representing the file to write to
return System.IO

SmbFileOutputStream() public method

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the URL parameter. See SmbFile for a detailed description and examples of the smb URL syntax. If the second argument is true, then bytes will be written to the end of the file rather than the beginning.
public SmbFileOutputStream ( string url, bool append ) : System.IO
url string An smb URL string representing the file to write to
append bool Append to the end of file
return System.IO

SmbFileOutputStream() public method

Creates an System.IO.OutputStream for writing bytes to a file on an SMB server addressed by the SmbFile parameter. See SmbFile for a detailed description and examples of the smb URL syntax.

The second parameter specifies how the file should be shared. If SmbFile.FILE_NO_SHARE is specified the client will have exclusive access to the file. An additional open command from jCIFS or another application will fail with the "file is being accessed by another process" error. The FILE_SHARE_READ, FILE_SHARE_WRITE, and FILE_SHARE_DELETE may be combined with the bitwise OR '|' to specify that other peocesses may read, write, and/or delete the file while the jCIFS user has the file open.

public SmbFileOutputStream ( string url, int shareAccess ) : System.IO
url string An smb URL representing the file to write to
shareAccess int File sharing flag: SmbFile.FILE_NOSHARE or any combination of SmbFile.FILE_READ, SmbFile.FILE_WRITE, and SmbFile.FILE_DELETE ///
return System.IO

Write() public method

Writes b.length bytes from the specified byte array to this file output stream.
Writes b.length bytes from the specified byte array to this file output stream.
if a network error occurs
public Write ( byte b ) : void
b byte
return void

Write() public method

Writes len bytes from the specified byte array starting at offset off to this file output stream.
Writes len bytes from the specified byte array starting at offset off to this file output stream.
if a network error occurs
public Write ( byte b, int off, int len ) : void
b byte The array
off int
len int
return void

Write() public method

Writes the specified byte to this file output stream.
Writes the specified byte to this file output stream.
if a network error occurs
public Write ( int b ) : void
b int
return void

WriteDirect() public method

Just bypasses TransWaitNamedPipe - used by DCERPC bind.
Just bypasses TransWaitNamedPipe - used by DCERPC bind.
public WriteDirect ( byte b, int off, int len, int flags ) : void
b byte
off int
len int
flags int
return void