パッケージ jcifs.smb
クラス SmbFileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- jcifs.smb.SmbFileOutputStream
-
- すべての実装されたインタフェース:
Closeable,Flushable,AutoCloseable
- 直系の既知のサブクラス:
SmbPipeOutputStream
public class SmbFileOutputStream extends OutputStream
ThisOutputStreamcan write bytes to a file on an SMB file server.
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 SmbFileOutputStream(SmbFile file)Creates anOutputStreamfor writing bytes to a file on an SMB server represented by theSmbFileparameter.SmbFileOutputStream(SmbFile file, boolean append)Creates anOutputStreamfor writing bytes to a file on an SMB server addressed by theSmbFileparameter.
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 voidclose()Closes this output stream and releases any system resources associated with it.protected jcifs.smb.SmbFileHandleImplensureOpen()protected jcifs.smb.SmbTreeHandleImplensureTreeConnected()protected voidinit(jcifs.smb.SmbTreeHandleImpl th)booleanisOpen()voidwrite(byte[] b)Writes b.length bytes from the specified byte array to this file output stream.voidwrite(byte[] b, int off, int len)Writes len bytes from the specified byte array starting at offset off to this file output stream.voidwrite(int b)Writes the specified byte to this file output stream.voidwriteDirect(byte[] b, int off, int len, int flags)Just bypasses TransWaitNamedPipe - used by DCERPC bind.-
クラスから継承されたメソッド java.io.OutputStream
flush, nullOutputStream
-
-
-
-
コンストラクタの詳細
-
SmbFileOutputStream
public SmbFileOutputStream(SmbFile file) throws SmbException
Creates anOutputStreamfor writing bytes to a file on an SMB server represented by theSmbFileparameter. SeeSmbFilefor a detailed description and examples of the smb URL syntax.- パラメータ:
file- AnSmbFilespecifying the file to write to- 例外:
SmbException
-
SmbFileOutputStream
public SmbFileOutputStream(SmbFile file, boolean append) throws SmbException
Creates anOutputStreamfor writing bytes to a file on an SMB server addressed by theSmbFileparameter. SeeSmbFilefor a detailed description and examples of the smb URL syntax. If the second argument istrue, then bytes will be written to the end of the file rather than the beginning.- パラメータ:
file- AnSmbFilerepresenting the file to write toappend- Append to the end of file- 例外:
SmbException
-
-
メソッドの詳細
-
init
protected final void init(jcifs.smb.SmbTreeHandleImpl th) throws CIFSException- パラメータ:
th-- 例外:
SmbExceptionCIFSException
-
close
public void close() throws IOExceptionCloses this output stream and releases any system resources associated with it.- 定義:
closeインタフェース内AutoCloseable- 定義:
closeインタフェース内Closeable- オーバーライド:
closeクラス内OutputStream- 例外:
IOException- if a network error occurs
-
write
public void write(int b) throws IOExceptionWrites the specified byte to this file output stream.- 定義:
writeクラス内OutputStream- 例外:
IOException- if a network error occurs
-
write
public void write(byte[] b) throws IOExceptionWrites b.length bytes from the specified byte array to this file output stream.- オーバーライド:
writeクラス内OutputStream- 例外:
IOException- if a network error occurs
-
isOpen
public boolean isOpen()
- 戻り値:
- whether the stream is open
-
ensureOpen
protected jcifs.smb.SmbFileHandleImpl ensureOpen() throws CIFSException- 例外:
CIFSException
-
ensureTreeConnected
protected jcifs.smb.SmbTreeHandleImpl ensureTreeConnected() throws CIFSException- 例外:
CIFSException
-
write
public void write(byte[] b, int off, int len) throws IOExceptionWrites len bytes from the specified byte array starting at offset off to this file output stream.- オーバーライド:
writeクラス内OutputStream- パラメータ:
b- The array- 例外:
IOException- if a network error occurs
-
writeDirect
public void writeDirect(byte[] b, int off, int len, int flags) throws IOExceptionJust bypasses TransWaitNamedPipe - used by DCERPC bind.- パラメータ:
b-off-len-flags-- 例外:
IOException
-
-