public class CircleStreamBuffer extends Object
InputStream and OutputStream access to buffered data.| Constructor and Description |
|---|
CircleStreamBuffer()
Creates a
CircleStreamBuffer with default buffer size. |
CircleStreamBuffer(int initialCapacity)
Create a
CircleStreamBuffer with given initial buffer size. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes write and read part (and hence the complete buffer).
|
void |
closeRead()
Closes the read (output) part of the
CircleStreamBuffer. |
void |
closeWrite()
Closes the write (input) part of the
CircleStreamBuffer. |
InputStream |
getInputStream()
Get
InputStream for data read access. |
OutputStream |
getOutputStream()
Get
OutputStream for write data. |
public CircleStreamBuffer()
CircleStreamBuffer with default buffer size.public CircleStreamBuffer(int initialCapacity)
CircleStreamBuffer with given initial buffer size.initialCapacity - initial capacity of internal bufferpublic InputStream getInputStream()
InputStream for data read access.public OutputStream getOutputStream()
OutputStream for write data.public void closeWrite()
CircleStreamBuffer.
After this call the buffer can only be read out.public void closeRead()
CircleStreamBuffer.
After this call it is possible to write into the buffer (but can never be read out).public void close()
Copyright © 2020. All rights reserved.