sleep.bridges.io
Class BufferObject
public
class
BufferObject
extends IOObject
The buffer works as follows. Once allocated it is open for writing. When the scripter chooses to
close the buffer it is then available for reading. The second time it is closed all of its resources
are deallocated.
Field Summary |
protected ByteArrayInputStream | readme The readable source for this IO object |
protected ByteArrayOutputStream | source The writeable source for this IO object |
Method Summary |
void | allocate(int initialSize) allocates a writeable buffer with the specified initial capacity |
void | close() handles our closing semantices i.e. first time it is called the writeable portion is opened
up for reading and the second time all resources are deallocated |
Object | getSource() returns the stream referenced by this IOObject |
protected ByteArrayInputStream readme
The readable source for this IO object
protected ByteArrayOutputStream source
The writeable source for this IO object
public void allocate(int initialSize)
allocates a writeable buffer with the specified initial capacity
public void close()
handles our closing semantices i.e. first time it is called the writeable portion is opened
up for reading and the second time all resources are deallocated
public Object getSource()
returns the stream referenced by this IOObject