Class TailInputStream
java.lang.Object
java.io.InputStream
com.carrotsearch.ant.tasks.junit4.TailInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
An input stream that tails from a random access file as new input appears there.
It's a lousy solution but we don't have access to real interprocess pipes from Java.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate RandomAccessFileprivate static final longHow long to sleep (millis) before checking for updates? -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class InputStream
available, mark, reset, skip
-
Field Details
-
TAIL_CHECK_DELAY
private static final long TAIL_CHECK_DELAYHow long to sleep (millis) before checking for updates?- See Also:
-
raf
-
closed
private volatile boolean closed
-
-
Constructor Details
-
TailInputStream
- Throws:
FileNotFoundException
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-