public final class XMLUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeInputStream(InputStream stream) |
static boolean |
isBadXml(InputStream inputStream)
This method checks through the XML with a blank parser to determine
whether SAX parsing will fail due to an exception.
|
static boolean |
isZip(String fileName) |
static void |
readSAXInput(org.xml.sax.helpers.DefaultHandler handler,
String completionCode,
InputStream stream)
This method with one argument sets up the SAXParser and inputStream correctly
and executes the parsing.
|
public static boolean isBadXml(InputStream inputStream)
inputStream - The stream to validatepublic static void readSAXInput(org.xml.sax.helpers.DefaultHandler handler, String completionCode, InputStream stream)
handler - The XML parser to delegate tocompletionCode - The message of an exception thrown by the handler to indicate end-of-readingstream - Input stream to read frompublic static void closeInputStream(InputStream stream)
public static boolean isZip(String fileName)
Copyright © 2018 Denim Group, Ltd.; Secure Decisions, A Division of Applied Visions, Inc.. All rights reserved.