@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 OSSIOExceptionpublic void write(int b)
throws IOException
write in class OutputStreamb - the bytes to writeIOExceptionpublic void write(byte[] b)
throws IOException
write in class OutputStreamb - the byte arrayIOExceptionpublic 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 writeIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionCopyright © 2017. All Rights Reserved.