public class Dsmlv2ResponseParser extends Object
Constructor and Description |
---|
Dsmlv2ResponseParser(LdapApiService codec)
Creates a new instance of Dsmlv2ResponseParser.
|
Modifier and Type | Method and Description |
---|---|
BatchResponseDsml |
getBatchResponse()
Gets the Batch Response or null if the it has not been parsed yet
|
DsmlDecorator<? extends Response> |
getNextResponse()
Returns the next Request or null if there's no more request
|
void |
parse()
Launches the parsing on the input
|
void |
parseAllResponses()
Parses all the responses
|
void |
parseBatchResponse()
Launches the parsing of the Batch Response only
|
void |
setInput(InputStream inputStream,
String inputEncoding)
Sets the input stream the parser is going to process
|
void |
setInput(String str)
Sets the input string the parser is going to parse
|
void |
setInputFile(String fileName)
Sets the input file the parser is going to parse.
|
public Dsmlv2ResponseParser(LdapApiService codec) throws org.xmlpull.v1.XmlPullParserException
codec
- The Ldap Service to useorg.xmlpull.v1.XmlPullParserException
- if an error occurs while the initialization of the parserpublic void setInput(String str) throws org.xmlpull.v1.XmlPullParserException
str
- the string the parser is going to parseorg.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserpublic void setInputFile(String fileName) throws IOException, org.xmlpull.v1.XmlPullParserException
fileName
- the name of the fileIOException
- if the file does not existorg.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserpublic void setInput(InputStream inputStream, String inputEncoding) throws org.xmlpull.v1.XmlPullParserException
inputStream
- contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)inputEncoding
- if not null it MUST be used as encoding for inputStreamorg.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserpublic void parse() throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
- when an unrecoverable error occursIOException
- when an IO exception occurspublic void parseBatchResponse() throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
- if an error occurs in the parserpublic BatchResponseDsml getBatchResponse()
public DsmlDecorator<? extends Response> getNextResponse() throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
- when an error occurs during the parsingpublic void parseAllResponses() throws org.xmlpull.v1.XmlPullParserException
org.xmlpull.v1.XmlPullParserException
- when an error occurs during the parsingCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.