public class SmbFileOutputStream extends OutputStream
OutputStream can write bytes to a file on an SMB file server.| Constructor and Description |
|---|
SmbFileOutputStream(SmbFile file)
Creates an
OutputStream for writing bytes to a file on
an SMB server represented by the SmbFile parameter. |
SmbFileOutputStream(SmbFile file,
boolean append)
Creates an
OutputStream for writing bytes to a file
on an SMB server addressed by the SmbFile parameter. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this output stream and releases any system resources associated
with it.
|
boolean |
isOpen() |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this
file output stream.
|
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at
offset off to this file output stream.
|
void |
write(int b)
Writes the specified byte to this file output stream.
|
void |
writeDirect(byte[] b,
int off,
int len,
int flags)
Just bypasses TransWaitNamedPipe - used by DCERPC bind.
|
flushpublic SmbFileOutputStream(SmbFile file) throws SmbException
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.file - An SmbFile specifying the file to write toSmbExceptionpublic SmbFileOutputStream(SmbFile file, boolean append) throws SmbException
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.file - An SmbFile representing the file to write toappend - Append to the end of fileSmbExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - if a network error occurspublic void write(int b)
throws IOException
write in class OutputStreamIOException - if a network error occurspublic void write(byte[] b)
throws IOException
write in class OutputStreamIOException - if a network error occurspublic boolean isOpen()
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - The arrayIOException - if a network error occurspublic void writeDirect(byte[] b,
int off,
int len,
int flags)
throws IOException
b - off - len - flags - IOExceptionCopyright © 2018. All rights reserved.