public static class RuntimeExec.InputStreamReaderThread extends Thread
InputStream and writes it into a
StringBuffer
The reading of the input stream is buffered.
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected Charset |
charset |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
RuntimeExec.InputStreamReaderThread(InputStream is,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToBuffer(String msg) |
String |
getBuffer() |
boolean |
isComplete() |
protected void |
processBytes(byte[] bytes,
int count) |
void |
run() |
void |
waitForCompletion()
Waits for the run to complete.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected final Charset charset
public RuntimeExec.InputStreamReaderThread(InputStream is, Charset charset)
is - an input stream to read - it will be wrapped in a buffer
for readingprotected void processBytes(byte[] bytes,
int count)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic void waitForCompletion()
Remember to start the thread first
public void addToBuffer(String msg)
msg - the message to add to the bufferpublic boolean isComplete()
public String getBuffer()
Copyright © 2014 Alfresco Software. All rights reserved.