@NotThreadSafe public final class COSOutputStream extends OutputStream
close() method is called.| Constructor and Description |
|---|
COSOutputStream(String bucketName,
String key,
com.qcloud.cos.COSClient client,
List<String> tmpDirs)
Creates a name instance of
COSOutputStream. |
| 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 COSOutputStream(String bucketName, String key, com.qcloud.cos.COSClient client, List<String> tmpDirs) throws IOException
COSOutputStream.bucketName - the name of the bucketkey - the key of the fileclient - the client for COStmpDirs - a list of possible temporary directoriesIOExceptionpublic 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 © 2019. All Rights Reserved.