Package org.robovm.compiler.util.io
Class FilteringStreamProxy
java.lang.Object
java.lang.Thread
org.robovm.compiler.util.io.FilteringStreamProxy
- All Implemented Interfaces:
Runnable
public abstract class FilteringStreamProxy extends Thread
Reads from one
InputStream and writes to an OutputStream
looking for a pattern in the in data.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields Modifier and Type Field Description protected InputStreaminprotected OutputStreamoutFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors Constructor Description FilteringStreamProxy(int bufferSize, InputStream in, OutputStream out)FilteringStreamProxy(InputStream in, OutputStream out) -
Method Summary
Modifier and Type Method Description protected voidcloseStreams()protected abstract booleanfindPattern(byte[] b, int length, OutputStream out)Searches for a pattern in the specified buffer.protected voidhandleException(Throwable t)voidrun()protected booleanshouldStop()Methods inherited from class java.lang.Thread
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, yield
-
Field Details
-
in
-
out
-
-
Constructor Details
-
FilteringStreamProxy
-
FilteringStreamProxy
-
-
Method Details
-
findPattern
Searches for a pattern in the specified buffer. Returnstruewhen found. It's the responsibility of this method to write any buffered bytes to the specifiedOutputStreamonce the pattern has been found.- Throws:
IOException
-
run
public void run() -
closeStreams
protected void closeStreams() -
handleException
-
shouldStop
protected boolean shouldStop()
-