|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.LogFile
Represents a XML log file.
Build information that is based on the log name is in the BuildInfo
class
BuildInfo
,
Serialized FormField Summary | |
static java.lang.String |
LOG_COMPRESSED_SUFFIX
|
static java.lang.String |
LOG_SUFFIX
|
Constructor Summary | |
LogFile(java.io.File xmlFile)
Creates a new instance of LogFile |
|
LogFile(java.io.File logDir,
java.lang.String logName)
Creates a new instance of LogFile |
Method Summary | |
org.jdom.Document |
asDocument()
|
BuildInfo |
getBuildInfo()
Gets the build information for this log file like the label and build date. |
java.io.File |
getFile()
Gets the file object. |
java.io.InputStream |
getInputStream()
Gets a stream with the log file's content. |
static LogFile |
getLatestLogFile(java.io.File logDir)
Gets the latest log file in a given directory. |
static LogFile |
getLatestSuccessfulLogFile(java.io.File logDir)
Gets the latest successful log file in a given directory. |
java.io.File |
getLogDirectory()
Gets the log file's directory. |
java.lang.String |
getName()
Gets the log's name. |
LogFileReader |
getReader()
|
boolean |
isCompressed()
Whether the log file is compressed or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOG_SUFFIX
public static final java.lang.String LOG_COMPRESSED_SUFFIX
Constructor Detail |
public LogFile(java.io.File logDir, java.lang.String logName)
logDir
- directory with the XML log filelogName
- name of the XML log filepublic LogFile(java.io.File xmlFile)
xmlFile
- the XML log fileMethod Detail |
public static LogFile getLatestLogFile(java.io.File logDir)
null
if there are no log
files in the given directory.public static LogFile getLatestSuccessfulLogFile(java.io.File logDir)
null
if there are no
successful log files in the given directorypublic BuildInfo getBuildInfo() throws java.text.ParseException
java.text.ParseException
public java.io.File getFile()
public boolean isCompressed()
true
if the file is compressedpublic java.lang.String getName()
.xml or
.xml.gz
. Use getFile().getName()
to get the
file name with extension.
- Returns:
- the name of the log
public java.io.File getLogDirectory()
public java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- if there is an error reading the filepublic org.jdom.Document asDocument() throws org.jdom.JDOMException, java.io.IOException
org.jdom.JDOMException
java.io.IOException
public LogFileReader getReader() throws org.jdom.JDOMException, java.io.IOException
org.jdom.JDOMException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |