Package com.hierynomus.smbj.share
Class FileOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- com.hierynomus.smbj.share.FileOutputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
class FileOutputStream extends java.io.OutputStream
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FileOutputStream.ByteArrayProvider
-
Field Summary
Fields Modifier and Type Field Description private boolean
isClosed
private static org.slf4j.Logger
logger
private ProgressListener
progressListener
private FileOutputStream.ByteArrayProvider
provider
private SMB2Writer
writer
-
Constructor Summary
Constructors Constructor Description FileOutputStream(SMB2Writer writer, int bufferSize, long offset, ProgressListener progressListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
private void
sendWriteRequest()
private void
verifyConnectionNotClosed()
void
write(byte[] b)
void
write(byte[] b, int off, int len)
void
write(int b)
-
-
-
Field Detail
-
writer
private SMB2Writer writer
-
progressListener
private ProgressListener progressListener
-
isClosed
private boolean isClosed
-
provider
private FileOutputStream.ByteArrayProvider provider
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Detail
-
FileOutputStream
FileOutputStream(SMB2Writer writer, int bufferSize, long offset, ProgressListener progressListener)
-
-
Method Detail
-
write
public void write(int b) throws java.io.IOException
- Specified by:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
write
public void write(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
write
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
sendWriteRequest
private void sendWriteRequest()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.OutputStream
- Throws:
java.io.IOException
-
verifyConnectionNotClosed
private void verifyConnectionNotClosed() throws java.io.IOException
- Throws:
java.io.IOException
-
-