com.antelmann.net
Class ServerLogFile
java.lang.Object
java.io.File
com.antelmann.io.MyFile
com.antelmann.net.ServerLogFile
- All Implemented Interfaces:
- ServerLog, Serializable, Comparable<File>
public class ServerLogFile
- extends MyFile
- implements ServerLog
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".
- Author:
- Holger Antelmann
- See Also:
ServerLogEntry,
Serialized Form
| Methods inherited from class com.antelmann.io.MyFile |
append, clear, compareContent, compareContent, compress, compressTo, copyTo, copyTo, count, createTempDir, createTempDir, decrypt, digestMD5, digestSHA1, directoryCompare, directoryCompare, encrypt, ensureExtension, fileCompareText, fileCompareText, getContentAsBytes, getContentAsString, getContentAsString, getContentAsUTF8, getFileExtension, getFileRelativeTo, getFileTypes, getNameWithoutExtension, getWorkingDir, hasParent, indexOf, indexOf, indexOf, length, listFilesInTree, listFilesInTree, listFilesInTree, listSubDirs, loadObject, loadObject, loadProperties, objectEnumerator, objectEnumerator, objectEnumerator, removeTree, replace, replace, storeProperties, synchronizeDir, synchronizeDir, synchronizeDir, synchronizeDir, synchronizeDir, touch, uncompress, uncompressTo, unzipTo, unzipTo, unzipTo, unzipTo, writeBytes, writeln, writeObject, writeStackTrace, writeStackTrace, writeText, writeUTF8, zipTo, zipTo, zipTo |
| Methods inherited from class java.io.File |
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
dateFormat
protected SimpleDateFormat dateFormat
ServerLogFile
public ServerLogFile(String fileName)
ServerLogFile
public ServerLogFile(File file)
getServerLogEntryEnumerator
public Enumeration<ServerLogEntry> getServerLogEntryEnumerator(Filter<ServerLogEntry> filter)
- Description copied from interface:
ServerLog
- returns an Enumeration of all ServerLogEntry objects that are accepted
by the given filter or all ServerLogEntries if the filter is null.
- Specified by:
getServerLogEntryEnumerator in interface ServerLog
- Returns:
- an Enumeration of ServerLogEntry objects;
note that there may be null values in the Enumeration,
if the entry couldn't be properly parsed.
- See Also:
ServerLogEntry
parseLine
protected ServerLogEntry parseLine(String line)
- parses a single line from the log file and constructs a ServerLogEntry (default parsing for Apache)
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads