@NotThreadSafe public final class OBSOutputStream extends OutputStream
close()
method is called.Constructor and Description |
---|
OBSOutputStream(String bucketName,
String key,
com.obs.services.ObsClient client,
List<String> tmpDirs)
Creates a name instance of
OBSOutputStream . |
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 OBSOutputStream(String bucketName, String key, com.obs.services.ObsClient client, List<String> tmpDirs) throws IOException
OBSOutputStream
.bucketName
- the name of the bucketkey
- the key of the fileclient
- the OBS clienttmpDirs
- a list of 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.