|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.aocat.psis.client.utils.Utils
public class Utils
Utilities class.
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static byte[] |
getBytes(java.io.InputStream is)
Gets a byte array from an InputStream. |
static byte[] |
getBytesFromFile(java.lang.String path)
Returns the contents of the file in a byte array. |
static byte[] |
getBytesFromFileAbsPath(java.lang.String absPath)
Returns the contents of the file in a byte array. |
static java.security.cert.X509Certificate |
getCertificate(java.lang.String path)
Builds a certificate from the path of the file that contains it. |
static void |
printXmlObject(org.apache.xmlbeans.XmlObject xmlObj)
Prints an XMLObject (pretty print). |
static void |
printXmlObject(org.apache.xmlbeans.XmlObject xmlObj,
java.lang.String filePath)
Prints an XMLObject (pretty print) and saves it to disk. |
static void |
saveToFile(byte[] data,
java.lang.String fileAbsolutePath)
Saves byte[] to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static void printXmlObject(org.apache.xmlbeans.XmlObject xmlObj,
java.lang.String filePath)
xmlObj - XMLObject to printpublic static void printXmlObject(org.apache.xmlbeans.XmlObject xmlObj)
xmlObj - XMLObject to print
public static java.security.cert.X509Certificate getCertificate(java.lang.String path)
throws java.security.cert.CertificateException
path - path of the file that contains the certificate
java.security.cert.CertificateException
public static byte[] getBytesFromFile(java.lang.String path)
throws java.io.IOException
path - path of the file relative to classpath
java.io.IOException
public static byte[] getBytesFromFileAbsPath(java.lang.String absPath)
throws java.io.IOException
absPath - absolute path of the file
java.io.IOException
public static byte[] getBytes(java.io.InputStream is)
throws java.io.IOException
is - InputStream
java.io.IOException
public static void saveToFile(byte[] data,
java.lang.String fileAbsolutePath)
throws java.io.IOException
data - data to savefileAbsolutePath - absolute path of the file where to save the data
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||