public class IOStreamWriter extends Worker<InputStream,Integer>
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
isError
The flag specifying whether to print in the standard error or in the standard output.
|
protected IOHandler |
printer
The printer
IOHandler . |
CURRENT_ID, CURRENT_ID_LOCK, id, input, workQueue
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
IOStreamWriter(IOHandler printer,
boolean isError)
Constructs an
IOStreamWriter with the specified printer IOHandler and flag
specifying whether to print in the standard error or in the standard output. |
Modifier and Type | Method and Description |
---|---|
Integer |
call(InputStream input)
Processes the specified
I input. |
IOStreamWriter |
clone()
Clones
this . |
boolean |
equals(Object other)
Tests whether
this is equal to other . |
int |
hashCode()
Returns the hash code of
this . |
call, finalize, run, setInput, setWorkQueue, toString
activeCount, checkAccess, 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, yield
protected final boolean isError
public IOStreamWriter(IOHandler printer, boolean isError)
IOStreamWriter
with the specified printer IOHandler
and flag
specifying whether to print in the standard error or in the standard output.
printer
- the printer IOHandler
isError
- the flag specifying whether to print in the standard error or in the standard
outputpublic Integer call(InputStream input)
Worker
I
input.
call
in class Worker<InputStream,Integer>
input
- the I
input to process
O
outputpublic IOStreamWriter clone()
this
.
clone
in interface ICloneable<Worker<InputStream,Integer>>
clone
in class Worker<InputStream,Integer>
this
ICloneable
public boolean equals(Object other)
this
is equal to other
.
equals
in class Object
other
- the other Object
to compare against for equality (may be null
)
true
if this
is equal to other
, false
otherwisehashCode()
public int hashCode()
this
.
hashCode
in class Object
this
equals(Object)
,
System.identityHashCode(Object)
Copyright © 2013–2022. All rights reserved.