@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 directoriesIOException
public void write(int b) throws IOException
write
in class OutputStream
b
- the bytes to writeIOException
public void write(byte[] b) throws IOException
write
in class OutputStream
b
- the byte arrayIOException
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- the byte arrayoff
- the start offset in the datalen
- the number of bytes to writeIOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
Copyright © 2023. All Rights Reserved.