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 boolean
private RandomAccessFile
private static final long
How long to sleep (millis) before checking for updates? -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.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:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-