@NotThreadSafe
public final class COSOutputStream
extends java.io.OutputStream
close() method is called.| Constructor and Description |
|---|
COSOutputStream(java.lang.String bucketName,
java.lang.String key,
com.qcloud.cos.COSClient client,
java.util.List<java.lang.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(java.lang.String bucketName,
java.lang.String key,
com.qcloud.cos.COSClient client,
java.util.List<java.lang.String> tmpDirs)
throws java.io.IOException
COSOutputStream.bucketName - the name of the bucketkey - the key of the fileclient - the client for COStmpDirs - a list of possible temporary directoriesjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - the bytes to writejava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte arrayjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamb - the byte arrayoff - the start offset in the datalen - the number of bytes to writejava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionCopyright © 2023. All Rights Reserved.