@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ErrorLogReader extends java.lang.Object implements java.io.Closeable
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
Constructor and Description |
---|
ErrorLogReader(java.io.File file)
Creates a new error log reader that will read messages from the specified
log file.
|
ErrorLogReader(java.io.Reader reader)
Creates a new error log reader that will read messages using the provided
Reader object. |
ErrorLogReader(java.lang.String path)
Creates a new error log reader that will read messages from the specified
log file.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this error log reader.
|
ErrorLogMessage |
read()
Reads the next error log message from the log file.
|
public ErrorLogReader(@NotNull java.lang.String path) throws java.io.IOException
path
- The path of the log file to read.java.io.IOException
- If a problem occurs while opening the file for
reading.public ErrorLogReader(@NotNull java.io.File file) throws java.io.IOException
file
- The log file to read.java.io.IOException
- If a problem occurs while opening the file for
reading.public ErrorLogReader(@NotNull java.io.Reader reader)
Reader
object.reader
- The reader to use to read log messages.@Nullable public ErrorLogMessage read() throws java.io.IOException, LogException
null
if
there are no more messages to be read.java.io.IOException
- If an error occurs while trying to read from the
file.LogException
- If an error occurs while trying to parse the log
message.public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
- If a problem occurs while closing the reader.