public class Utils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
lastXMLAsString |
static List<Document> |
parsedDocuments |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static Document |
bytes2xml(byte[] ab) |
static void |
cacheDocument(Document doc) |
static Element |
createChildElement(Node parent,
String tag) |
static Element |
createChildElement(Node parent,
String tag,
String text) |
static Node |
createChildElementIfNotExists(Node parent,
String child_name) |
static Document |
file2xml(String filename) |
static Node |
getChildNode(Node parent,
String child_tagname) |
static Document |
getEntityContentAsDocument(org.apache.http.HttpEntity entity) |
ByteArrayInputStream |
getResponseContent(org.apache.http.HttpEntity entity) |
static String |
getTraceAsString(Throwable e) |
static String |
getUniqueChildNodeValue(Node parent,
String child_tagname) |
static String |
nodeValue(Node node) |
static String |
parseErrorResponse(org.apache.http.HttpEntity entity) |
static Document |
parseResponse(org.apache.http.HttpEntity entity) |
static void |
printSystemProperties(PrintStream out) |
static void |
setCDATAValue(Node node,
String data) |
static void |
setChildNodeCDATAValue(Node parent,
String child_name,
String data) |
static void |
setChildNodeTextValue(Node parent,
String child_name,
String data) |
static void |
setNodeTextValue(Node node,
String text) |
static Document |
string2xml(String s) |
static String |
uniqueTagValue(String tagname,
Document doc,
boolean bMandatory) |
static void |
xml2file(Document doc,
File file) |
static String |
xml2string(Document doc) |
public static String lastXMLAsString
public static void cacheDocument(Document doc)
public static Document getEntityContentAsDocument(org.apache.http.HttpEntity entity) throws Exception
Exception
public static String uniqueTagValue(String tagname, Document doc, boolean bMandatory) throws Exception
Exception
public static String getUniqueChildNodeValue(Node parent, String child_tagname) throws Exception
Exception
public static Document parseResponse(org.apache.http.HttpEntity entity) throws Exception
Exception
public static String parseErrorResponse(org.apache.http.HttpEntity entity) throws Exception
Exception
public ByteArrayInputStream getResponseContent(org.apache.http.HttpEntity entity) throws Exception
Exception
public static void setChildNodeCDATAValue(Node parent, String child_name, String data)
public static void setChildNodeTextValue(Node parent, String child_name, String data)
public static Node createChildElementIfNotExists(Node parent, String child_name)
public static void printSystemProperties(PrintStream out)
Copyright © 2004-2013 Deep Shift Labs. All Rights Reserved.