@NotThreadSafe public final class OSSOutputStream extends OutputStream
close() method is called.| Constructor and Description |
|---|
OSSOutputStream(String bucketName,
String key,
com.aliyun.oss.OSSClient client)
Creates a name instance of
OSSOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this output stream.
|
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out.
|
void |
write(byte[] b)
Writes the given byte array to this output stream.
|
void |
write(byte[] b,
int off,
int len)
Writes the given number of bytes from the given byte array starting at the given offset to this
output stream.
|
void |
write(int b)
Writes the given bytes to this output stream.
|
public OSSOutputStream(String bucketName, String key, com.aliyun.oss.OSSClient client) throws IOException
OSSOutputStream.bucketName - the name of the bucketkey - the key of the fileclient - the client for OSSIOException - if an I/O error occurspublic void write(int b)
throws IOException
write in class OutputStreamb - the bytes to writeIOException - if an I/O error occurspublic void write(byte[] b)
throws IOException
write in class OutputStreamb - the byte arrayIOException - if an I/O error occurspublic void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamb - the byte arrayoff - the start offset in the datalen - the number of bytes to writeIOException - if an I/O error occurspublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOException - if an I/O error occurspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOException - if an I/O error occursCopyright © 2017. All Rights Reserved.