|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.util.Util
Method Summary | |
static void |
appendFileToBuffer(java.lang.String fileName,
java.lang.StringBuffer out)
Append the content of the file specified by its path into a StringBuffer |
static java.lang.String |
getOsName()
|
static boolean |
isWindows()
|
static java.util.Properties |
loadPropertiesFromFile(java.io.File file)
Loads a set of properties from the specified properties file. |
static org.jdom.Element |
loadRootElement(java.io.File configFile)
|
static org.jdom.Element |
loadRootElement(java.io.InputStream in)
|
static java.lang.String |
readFileToString(java.io.File file)
|
static java.lang.String |
readFileToString(java.lang.String fileName)
Return the content of the file specified by its path into a String |
static void |
storePropertiesToFile(java.util.Properties properties,
java.lang.String header,
java.io.File file)
Stores the contents of a Properties object to the specifed
file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static org.jdom.Element loadRootElement(java.io.File configFile) throws CruiseControlException
CruiseControlException
public static org.jdom.Element loadRootElement(java.io.InputStream in) throws CruiseControlException
CruiseControlException
public static boolean isWindows()
public static java.lang.String getOsName()
public static java.util.Properties loadPropertiesFromFile(java.io.File file) throws CruiseControlException, java.io.IOException
CruiseControlException
is thrown.
file
- The File
from which to load the properties
Properties
object which contains all properties
defined in the file.
CruiseControlException
java.io.IOException
public static void storePropertiesToFile(java.util.Properties properties, java.lang.String header, java.io.File file) throws CruiseControlException, java.io.IOException
Properties
object to the specifed
file. If the file does not exist, it will be created (if possible).
properties
- The Properties
object which will be stored to
fileheader
- A string which will be written to the first line of the
properties file as a comment. Can be null
.file
- The properties file to which the properties will be written.
CruiseControlException
java.io.IOException
public static java.lang.String readFileToString(java.lang.String fileName) throws java.io.IOException
String
java.io.IOException
public static java.lang.String readFileToString(java.io.File file) throws java.io.IOException
java.io.IOException
public static void appendFileToBuffer(java.lang.String fileName, java.lang.StringBuffer out) throws java.io.IOException
StringBuffer
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |