public abstract class SinkOutputStream extends OutputStream
Constructor and Description |
---|
SinkOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
close()
output stream shall be closed by the system AFTER Outputer::close()
calling close() on SinkOutputStream is a no-op
|
void |
flush()
Note that system will be performing memory control in the background, and will flush data only
when it is deemed necessary, therefore the flush here would be no-op.
|
abstract long |
getBytesWritten()
Get total number of bytes written by current output stream so far
|
abstract void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this output stream
|
abstract void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this output stream.
|
abstract void |
write(int b)
Writes a single byte to the output stream on each invocation, which is very
INEFFICIENT, it is not recommend to use this unless it is desirable to write one single
byte on each call.
|
public final void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
public final void flush()
flush
in interface Flushable
flush
in class OutputStream
public abstract void write(byte[] b) throws IOException
write
in class OutputStream
b
- the data.IOException
public abstract void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.IOException
public abstract void write(int b) throws IOException
write
in class OutputStream
IOException
public abstract long getBytesWritten()
Copyright © 2024 Alibaba Cloud Computing. All rights reserved.