|
Josh Native console access wrapper for Java |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.yifanlu.Josh.JoshBuffer
com.yifanlu.Josh.JoshInBuffer
public class JoshInBuffer
Provides native access to the input buffer.
This allows access to events in the console.
Do not call this class directly, use Josh.inBuffer.
| Constructor Summary | |
|---|---|
JoshInBuffer(ConsoleHandle handle)
Creates a new input buffer for reading console events. |
|
| Method Summary | |
|---|---|
int |
getNumberOfConsoleInputEvents()
Retrieves the number of unread input records in the console's input buffer. |
ConsoleEvent |
peekConsoleInput()
Reads data from the specified console input buffer without removing it from the buffer. |
ConsoleEvent |
readConsoleInput()
Reads data from a console input buffer and removes it from the buffer. |
void |
writeConsoleInput(ConsoleEvent event)
Writes data directly to the console input buffer. |
| Methods inherited from class com.yifanlu.Josh.JoshBuffer |
|---|
equals, getHandle, hashCode, setHandle |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JoshInBuffer(ConsoleHandle handle)
Josh.inBuffer to access, as
there is only one input buffer needed for a console.
You must have the GENERIC_READ permission in the handle for the buffer to use the methods below.
handle - A memory location that this buffer represents. Usually the STD_INPUT_HANDLE from Josh.| Method Detail |
|---|
public int getNumberOfConsoleInputEvents()
public ConsoleEvent peekConsoleInput()
public ConsoleEvent readConsoleInput()
public void writeConsoleInput(ConsoleEvent event)
event - Contains data to be written to the input buffer
|
Copyright © 2010 Yifan Lu | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||