congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ValueXMLhandler
Code IndexAdd Tabnine to your IDE (free)

How to use
ValueXMLhandler
in
com.novell.ldap.util

Best Java code snippets using com.novell.ldap.util.ValueXMLhandler (Showing top 20 results out of 315)

origin: com.novell.ldap/jldap

protected void initHandler() {
  //set Value Handler .
  setchildelement(new ValueXMLhandler(this));
}
protected void endElement() {
origin: com.novell.ldap/jldap

protected void endElement() {
 try {
  byte[] temp;
  String name = getName();
  String value = getValue();
  if (this.isBase64) {
   temp = Base64.decode(value);
  } else {
   temp = value.getBytes("UTF-8");
  }
  //getParent().addValue("value", temp);
  getParent().addValue(name, temp);
 } catch (UnsupportedEncodingException e) {
 }
}
protected void handleAttributes(Attributes attributes) throws SAXException {
origin: com.novell.ldap/jldap

protected void writeValue(StringBuffer buff){
 
String value = formatString();
 buff.append(ValueXMLhandler.newLine(2));
 buff.append("<value>");
 buff.append(value);
 buff.append("</value>"); 
}

origin: com.novell.ldap/jldap

/**
* This mehod separates whitespaces in non-text nodes during XML de-serialization.
* The whitespaces are added in non-text nodes because of XML doc written during
* Serialization needs to be stored with proper indentation. 
* @param whole The XML String with whitespaces in non-text nodes read from stream
* during de-serialization
* @param buffer StringBuffer which holds the resulting string after removal of 
* unwanted whitespaces in non-text nodes
*/
public static void parseInput(String whole, StringBuffer buffer){		 
  String token, part;
  int start, end;
  start = whole.indexOf('<');
  if(start != -1)
  {
    //if Index of start is not '<'
    if(start > 0)
       start = 0;
    end = whole.indexOf('>');
    token = whole.substring(start, end + 1);
    buffer.append(token);
    part = whole.substring(end + 1).trim();
    parseInput(part, buffer);  
  }
  return;
 }
origin: com.novell.ldap/jldap

  /**
  * Reads the serialized object from the underlying input stream.
  * @param in The ObjectInput stream where the Serialized Object is being read from
  * @throws IOException - If I/O errors occur
  * @throws ClassNotFoundException - If the class for an object being restored 
  * cannot be found.
  */
  public void readExternal(ObjectInput in) 
      throws IOException, ClassNotFoundException
   {
    String readData = in.readUTF();
    String readProperties = readData.substring(readData.indexOf('<'), 
         (readData.lastIndexOf('>') + 1));
         
    //Insert  parsing logic here for separating whitespace text nodes
    StringBuffer parsedBuff = new StringBuffer();
    ValueXMLhandler.parseInput(readProperties, parsedBuff);
    
    BufferedInputStream istream = 
        new BufferedInputStream(
            new ByteArrayInputStream((parsedBuff.toString()).getBytes()));
//        Sub classes need to override this method
    setDeserializedValues(istream);
    
//        Close the DSML reader stream
    istream.close(); 
  
  }
  
origin: com.novell.ldap/jldap

protected void writeValue(java.io.Writer out) throws IOException {
 
 String value = formatString();
 out.write(ValueXMLhandler.newLine(2));
 out.write("<value>");
 out.write(value);
 out.write("</value>");
}        
origin: com.novell.ldap/jldap

protected void initHandler() {
 //set value handler.
 setchildelement(new ValueXMLhandler(this));          
}
origin: com.novell.ldap/jldap

/**
* Reads the serialized object from the underlying input stream.
* @param in The ObjectInput stream where the Serialized Object is being read from
* @throws IOException - If I/O errors occur
* @throws ClassNotFoundException - If the class for an object being restored 
* cannot be found.
*/ 
public void readExternal(ObjectInput in) 
   throws IOException, ClassNotFoundException
{
 String readData = in.readUTF();
 String readProperties = readData.substring(readData.indexOf('<'), 
      (readData.lastIndexOf('>') + 1));
      
 //Insert  parsing logic here for separating whitespaces in non-text nodes
 StringBuffer parsedBuff = new StringBuffer();
 ValueXMLhandler.parseInput(readProperties, parsedBuff);
 
 BufferedInputStream istream = 
     new BufferedInputStream(
         new ByteArrayInputStream((parsedBuff.toString()).getBytes()));
 LDAPUrl readObject = 
        (LDAPUrl)LDAPUrl.readDSML(istream);
 this.parseURL( readObject.toString() );
 
 //Garbage collect the readObject from readDSML()..	
 readObject = null;
}
origin: com.novell.ldap/jldap

protected void writeValue(StringBuffer buff){
 
String value = formatString();
 buff.append(ValueXMLhandler.newLine(2));
 buff.append("<value>");
 buff.append(value);
 buff.append("</value>"); 
}

origin: com.novell.ldap/jldap

protected void initHandler() {
 //set value handler.
 setchildelement(new ValueXMLhandler(this));          
}
origin: com.novell.ldap/jldap

ValueXMLhandler.parseInput(readProperties, parsedBuff);
origin: com.novell.ldap/jldap

protected void writeValue(StringBuffer buff){
 
String value = formatString();
 buff.append(ValueXMLhandler.newLine(2));
 buff.append("<value>");
 buff.append(value);
 buff.append("</value>"); 
}

origin: com.novell.ldap/jldap

protected void initHandler() {
 //set value handler.
 setchildelement(new ValueXMLhandler(this));          
}
origin: com.novell.ldap/jldap

/**
* Reads the serialized object from the underlying input stream.
* @param in The ObjectInput stream where the Serialized Object is being read from
* @throws IOException - If I/O errors occur
* @throws ClassNotFoundException - If the class for an object being restored 
* cannot be found.
*/ 
public void readExternal(ObjectInput in) 
   throws IOException, ClassNotFoundException
{
 String readData = in.readUTF();
 String readProperties = readData.substring(readData.indexOf('<'), 
      (readData.lastIndexOf('>') + 1));
      
 //Insert  parsing logic here for separating whitespaces in non-text nodes
 StringBuffer parsedBuff = new StringBuffer();
 ValueXMLhandler.parseInput(readProperties, parsedBuff);
 
 BufferedInputStream istream = 
     new BufferedInputStream(
         new ByteArrayInputStream((parsedBuff.toString()).getBytes()));
 LDAPModification readObject = 
   (LDAPModification)LDAPModification.readDSML(istream);
 this.op = readObject.getOp();
 this.attr = readObject.getAttribute();
 
 //Garbage collect the readObject from readDSML()..	
 readObject = null;
}      
origin: com.novell.ldap/jldap

protected void writeValue(java.io.Writer out) throws IOException {
 
 String value = formatString();
 out.write(ValueXMLhandler.newLine(2));
 out.write("<value>");
 out.write(value);
 out.write("</value>");
}        
origin: com.novell.ldap/jldap

protected void initHandler() {
 //set value handler.
 setchildelement(new ValueXMLhandler(this));          
}
origin: com.novell.ldap/jldap

ValueXMLhandler.parseInput(readProperties, parsedBuff);
origin: com.novell.ldap/jldap

protected void writeValue(java.io.Writer out) throws IOException {
 
 String value = formatString();
 out.write(ValueXMLhandler.newLine(2));
 out.write("<value>");
 out.write(value);
 out.write("</value>");
}        
origin: com.novell.ldap/jldap

protected void initHandler() {
 //set value handler.
 setchildelement(new ValueXMLhandler("controlValue", this));
}
origin: com.novell.ldap/jldap

ValueXMLhandler.parseInput(readData, parsedBuff);
com.novell.ldap.utilValueXMLhandler

Javadoc

This class provides the implementation of the LDAPXMLHandler for the tag of DSML.

Most used methods

  • <init>
    This constructor makes no assumption about the tagname and allows the user to specify the same. Used
  • getName
  • getParent
  • getValue
  • newLine
    This mehod supports for adding indentation to the XML document written during XML serialization.
  • parseInput
    This mehod separates whitespaces in non-text nodes during XML de-serialization. The whitespaces are

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Notification (javax.management)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now