|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.OutputStream | +--org.gnu.jcifs.CifsFileOutputStream
The class implements a CIFS output stream.
The data is written into a buffer,
and then written to the underlying stream if the buffer reaches
its capacity, the buffer output stream is closed, or the buffer
output stream is explicity flushed. The default buffer
size is 2048. The system property org.gnu.jcifs.io.bufsize
specifies the buffer size.
The implementation was borrowed from BufferedInputStream.
Constructor Summary | |
CifsFileOutputStream(CifsDisk disk,
java.lang.String file,
boolean append)
Creates a file output stream to write to the specified file |
|
CifsFileOutputStream(CifsFile file,
boolean append)
Creates a file output stream to write to the specified file |
|
CifsFileOutputStream(java.lang.String sessionname,
java.lang.String file,
boolean append)
Creates a file output stream to write to the specified file |
Method Summary | |
void |
close()
Closes this output stream and releases any system resources associated with the stream. |
void |
finalize()
|
void |
flush()
Flushes this buffered output stream. |
CifsDisk |
getDisk()
Returns the disk on which the file resides |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array
starting at offset off to this buffered output stream.
|
void |
write(int b)
Writes the specified byte to this buffered output stream. |
Methods inherited from class java.io.OutputStream |
write |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CifsFileOutputStream(CifsDisk disk, java.lang.String file, boolean append) throws java.io.IOException
disk
- diskfile
- relativ to shareappend
- if true append data otherwise overwritepublic CifsFileOutputStream(java.lang.String sessionname, java.lang.String file, boolean append) throws java.io.IOException
sessioname
- disk session namefile
- file name( Syntax: /diskname/path
or diskname:\path
)append
- if true append data otherwise overwritepublic CifsFileOutputStream(CifsFile file, boolean append) throws java.io.IOException
file
- CIFS fileappend
- if true append data otherwise overwriteMethod Detail |
public CifsDisk getDisk() throws java.io.IOException
public void write(int b) throws java.io.IOException
b
- the byte to be written.public void write(byte[] b, int off, int len) throws java.io.IOException
len
bytes from the specified byte array
starting at offset off
to this buffered output stream.
Ordinarily this method stores bytes from the given array into this stream's buffer, flushing the buffer to the underlying output stream as needed. If the requested length is at least as large as this stream's buffer, however, then this method will flush the buffer and write the bytes directly to the underlying output stream.
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.public void flush() throws java.io.IOException
public void close() throws java.io.IOException
public void finalize()
|
Norbert Hranitzky | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |