|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
com.antelmann.io.MyFile
com.antelmann.net.ServerLogFile
public class ServerLogFile
ServerLogFile implements a web-server log based on a standard log file.
If a given logfile format is different so that it cannot be parsed by
this implementation, you can simply subclass this implementation and
override the parseLine(String) method.
This class also supports GZIP compressed files if they have the file
extension "gz".
ServerLogEntry,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
ServerLogFile.ServerLogEntryEnumerator
|
| Field Summary | |
|---|---|
protected SimpleDateFormat |
dateFormat
|
| Fields inherited from class com.antelmann.io.MyFile |
|---|
DIRECTORIES_ONLY, FILES_ONLY |
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Fields inherited from interface com.antelmann.calendar.Timed |
|---|
COMPARATOR, DATE_EXTRACTOR |
| Constructor Summary | |
|---|---|
ServerLogFile(File file)
|
|
ServerLogFile(String fileName)
|
|
| Method Summary | |
|---|---|
Enumeration<ServerLogEntry> |
getServerLogEntryEnumerator(Filter<ServerLogEntry> filter)
returns an Enumeration of all ServerLogEntry objects that are accepted by the given filter or all ServerLogEntries if the filter is null. |
protected ServerLogEntry |
parseLine(String line)
parses a single line from the log file and constructs a ServerLogEntry (default parsing for Apache) |
| Methods inherited from class java.io.File |
|---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SimpleDateFormat dateFormat
| Constructor Detail |
|---|
public ServerLogFile(String fileName)
public ServerLogFile(File file)
| Method Detail |
|---|
public Enumeration<ServerLogEntry> getServerLogEntryEnumerator(Filter<ServerLogEntry> filter)
ServerLog
getServerLogEntryEnumerator in interface ServerLogServerLogEntryprotected ServerLogEntry parseLine(String line)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||