public class CoffeeIOPipe
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
class |
CoffeeIOPipe.CMInputStream |
The input stream for a single pipe.
|
class |
CoffeeIOPipe.CMOutputStream |
The output stream for a single pipe.
|
static class |
CoffeeIOPipe.CoffeeIOPipes |
A pair of coffee pipes, for using to build
a pair of coffee pipe sockets.
|
static class |
CoffeeIOPipe.CoffeePipeSocket |
A fake socket that consists of a pair of CoffeePipes.
|
Constructor | Description |
---|---|
CoffeeIOPipe(int bufferSize) |
Construct a single two-way pipe.
|
CoffeeIOPipe(int bufferSize,
java.lang.Runnable writeCallback) |
Construct a single two-way pipe.
|
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
Closes the input stream.
|
CoffeeIOPipe.CMInputStream |
getInputStream() |
Returns the input stream
|
CoffeeIOPipe.CMOutputStream |
getOutputStream() |
Returns the pipe output stream
|
void |
setWriteCallback(java.lang.Runnable runner) |
Sets a callback that occurs when a write
occurs.
|
void |
shutdownInput() |
Shutdowns the input stream
|
void |
shutdownOutput() |
Shutdowns the output stream
|
public CoffeeIOPipe(int bufferSize, java.lang.Runnable writeCallback)
bufferSize
- size of the bufferwriteCallback
- optional runnable called when a write occurs.public CoffeeIOPipe(int bufferSize)
bufferSize
- size of the bufferpublic CoffeeIOPipe.CMInputStream getInputStream()
public CoffeeIOPipe.CMOutputStream getOutputStream()
public void setWriteCallback(java.lang.Runnable runner)
runner
- the optional callbackpublic void shutdownInput()
public void shutdownOutput()
public void close()