|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.util.KMethod
com.cometway.util.InputStreamReaderKMethod
public class InputStreamReaderKMethod
This method extends com.cometway.util.KMethod and implements the Runnable interface, which allows this KMethod to be executed by a PooledThread from a ThreadPool or another Thread. When executed, the InputStream given to this class is read from until either an End Of Transmission character is reached or the Thread is stopped.
| Field Summary | |
|---|---|
boolean |
changeCRtoLF
Set this flag to true if you want to be Carriage Returns replaced by Line Feeds. |
boolean |
changeLFtoCR
Set this flag to true if you want Line Feeds to be replaced by Carriage Returns. |
java.lang.Thread |
currentThread
This is set to the Thread that is executing this KMethod upon execution. |
java.lang.Object |
finishedReadNotify
Set this to the Object to notify() when the read has completed. |
boolean |
isRunning
This flag is set to TRUE when this KMethod is being executed. |
int |
readCharLimit
Set this to a value greater than zero and only this many characters will be read. |
| Fields inherited from class com.cometway.util.KMethod |
|---|
args, debugName, method, obj, print_errors, run, verbose |
| Constructor Summary | |
|---|---|
InputStreamReaderKMethod(java.io.InputStream inputStream)
|
|
InputStreamReaderKMethod(java.io.InputStream inputStream,
int endOfTransmissionChar)
|
|
InputStreamReaderKMethod(java.io.InputStream inputStream,
java.lang.StringBuffer readBuffer)
|
|
InputStreamReaderKMethod(java.io.InputStream inputStream,
java.lang.StringBuffer readBuffer,
int endOfTransmissionChar)
|
|
| Method Summary | |
|---|---|
void |
execute()
Overrides KMethod.execute() |
java.lang.StringBuffer |
getBuffer()
This method returns the StringBuffer that the InputStream is read into. |
void |
run()
This starts reading the InputStream. |
void |
stopReadThread()
This method stops the Thread that is executing this KMethod. |
| Methods inherited from class com.cometway.util.KMethod |
|---|
error, error, print |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.lang.Object finishedReadNotify
public java.lang.Thread currentThread
public boolean isRunning
public boolean changeLFtoCR
public boolean changeCRtoLF
public int readCharLimit
| Constructor Detail |
|---|
public InputStreamReaderKMethod(java.io.InputStream inputStream)
public InputStreamReaderKMethod(java.io.InputStream inputStream,
java.lang.StringBuffer readBuffer)
public InputStreamReaderKMethod(java.io.InputStream inputStream,
int endOfTransmissionChar)
public InputStreamReaderKMethod(java.io.InputStream inputStream,
java.lang.StringBuffer readBuffer,
int endOfTransmissionChar)
| Method Detail |
|---|
public void execute()
execute in class KMethodpublic void run()
run in interface java.lang.Runnablepublic java.lang.StringBuffer getBuffer()
public void stopReadThread()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||