Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class LogFollower extends InputStream
This class will block on read. If end of file is reached, it will continue to block until data becomes available. End of file is never returned from this class, it will wait indefinitely for data.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_POLL_INTERVAL |
| Constructor and Description |
|---|
LogFollower(File file) |
LogFollower(File file,
int pollInterval) |
LogFollower(String path) |
LogFollower(String path,
int pollInterval) |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
protected void |
finalize() |
int |
getPollInterval() |
int |
read() |
int |
read(byte[] b,
int offset,
int len) |
long |
skip(long n) |
mark, markSupported, read, resetpublic static final int DEFAULT_POLL_INTERVAL
public LogFollower(String path)
public LogFollower(File file)
public LogFollower(String path, int pollInterval)
public LogFollower(File file, int pollInterval)
public int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int getPollInterval()
protected void finalize()
throws Throwable
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int offset,
int len)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionCopyright © 2000–2016 AO Industries, Inc.. All rights reserved.