Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ohf.ihe.atna.audit.syslog.util
Class SyslogUtil

    java.lang.Object
      org.eclipse.ohf.ihe.atna.audit.syslog.util.SyslogUtil

    public class SyslogUtil

extends java.lang.Object

Constructor Summary
`SyslogUtil()`

Method Summary
`static java.lang.String` | `asciiToString(byte[] b, int off, int len)`
`static java.lang.String` | `getContents(java.io.File aFile)` Fetch the entire contents of a text file, and return it in a String.
`static java.lang.String` | `MessageToString(java.io.InputStream streamMessage)`
`static void` | `setContents(java.io.File aFile, java.lang.String aContents)` Change the contents of text file in its entirety, overwriting any existing text.
`static byte[]` | `stringBufferToAscii(java.lang.StringBuffer s)`
`static byte[]` | `stringToAscii(java.lang.String s)`
`static org.w3c.dom.Element` | `StringToXMLElement(java.lang.String message)`
`static java.lang.String` | `XMLElementToString(org.w3c.dom.Element xmlNode)`
`static java.lang.String` | `XMLNodeToString(org.w3c.dom.Node xmlNode)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SyslogUtil

    public SyslogUtil()

Method Detail

### XMLElementToString

    public static java.lang.String XMLElementToString(org.w3c.dom.Element xmlNode)

### XMLNodeToString

    public static java.lang.String XMLNodeToString(org.w3c.dom.Node xmlNode)

### StringToXMLElement

    public static org.w3c.dom.Element StringToXMLElement(java.lang.String message)
                                                  throws javax.xml.parsers.ParserConfigurationException,
                                                         org.xml.sax.SAXException,
                                                         java.io.IOException

  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `org.xml.sax.SAXException`
    `java.io.IOException`

### MessageToString

    public static java.lang.String MessageToString(java.io.InputStream streamMessage)

### getContents

    public static java.lang.String getContents(java.io.File aFile)

  Fetch the entire contents of a text file, and return it in a String. This style of implementation does not throw Exceptions to the caller.

  Parameters:
    `aFile` - is a file which already exists and can be read.

### setContents

    public static void setContents(java.io.File aFile,
                                   java.lang.String aContents)
                            throws java.io.FileNotFoundException,
                                   java.io.IOException

  Change the contents of text file in its entirety, overwriting any existing text. This style of implementation throws all exceptions to the caller.

  Parameters:
    `aFile` - is an existing file which can be written to.
  Throws:
    `java.lang.IllegalArgumentException` - if param does not comply.
    `java.io.FileNotFoundException` - if the file does not exist.
    `java.io.IOException` - if problem encountered during write.

### asciiToString

    public static java.lang.String asciiToString(byte[] b,
                                                 int off,
                                                 int len)

### stringToAscii

    public static byte[] stringToAscii(java.lang.String s)

### stringBufferToAscii

    public static byte[] stringBufferToAscii(java.lang.StringBuffer s)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD