protected class CircularByteBuffer.CircularByteBufferOutputStream
extends java.io.OutputStream
Modifier | Constructor and Description |
---|---|
protected |
CircularByteBufferOutputStream() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the stream, flushing it first.
|
void |
flush()
Flush the stream.
|
void |
write(byte[] cbuf)
Write an array of bytes.
|
void |
write(byte[] cbuf,
int off,
int len)
Write a portion of an array of bytes.
|
void |
write(int c)
Write a single byte.
|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
java.io.IOException
- never.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if the stream is closed.public void write(byte[] cbuf) throws java.io.IOException
write
in class java.io.OutputStream
cbuf
- Array of bytes to be writtenBufferOverflowException
- if buffer does not allow blocking writes
and the buffer is full. If the exception is thrown, no data
will have been written since the buffer was set to be non-blocking.java.io.IOException
- if the stream is closed, or the write is interrupted.public void write(byte[] cbuf, int off, int len) throws java.io.IOException
write
in class java.io.OutputStream
cbuf
- Array of bytesoff
- Offset from which to start writing byteslen
- - Number of bytes to writeBufferOverflowException
- if buffer does not allow blocking writes
and the buffer is full. If the exception is thrown, no data
will have been written since the buffer was set to be non-blocking.java.io.IOException
- if the stream is closed, or the write is interrupted.public void write(int c) throws java.io.IOException
write
in class java.io.OutputStream
c
- number of bytes to be writtenBufferOverflowException
- if buffer does not allow blocking writes
and the buffer is full.java.io.IOException
- if the stream is closed, or the write is interrupted.Copyright (c) 2001-2020 by Stephen Ostermiller