public class FSPOutputStream extends OutputStream
OutputStream
Constructor and Description |
---|
FSPOutputStream(FSPsession session,
String filename)
Creates stream for writing file to FSP server.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes buffer and installs file.
|
void |
finalize()
cancels pending upload and unlocks writer object.
|
void |
flush()
Flushes internal buffer to FSP server.
|
void |
write(byte[] b,
int off,
int len)
Writes byte array to FSP server
|
void |
write(int b)
Writes single byte to FSP server
|
write
public FSPOutputStream(FSPsession session, String filename)
session
- FSPsession to target serverfilename
- filenameFSPutil.upload(FSPsession, String, java.io.InputStream, long)
,
FSPutil.canUpload(FSPsession, String)
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void write(int b) throws IOException
write
in class OutputStream
b
- byte to writeIOException
OutputStream.write(int)
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- array containing data to writeoff
- data to write offsetlen
- lenght of data to writeIOException
OutputStream.write(byte[], int, int)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
FSPutil.upload(FSPsession, String, java.io.InputStream, long)
Copyright © 2020 FSP Project. All rights reserved.