Save This Page
Home » xml-commons-external-1.4.01-src » javax » xml » bind » annotation » adapters » [javadoc | source]
javax.xml.bind.annotation.adapters
public class: CollapsedStringAdapter [javadoc | source]
java.lang.Object
   javax.xml.bind.annotation.adapters.XmlAdapter<String, String>
      javax.xml.bind.annotation.adapters.CollapsedStringAdapter
Built-in XmlAdapter to handle xs:token and its derived types.

This adapter removes leading and trailing whitespaces, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.

Method from javax.xml.bind.annotation.adapters.CollapsedStringAdapter Summary:
isWhiteSpace,   marshal,   unmarshal
Methods from javax.xml.bind.annotation.adapters.XmlAdapter:
marshal,   unmarshal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.xml.bind.annotation.adapters.CollapsedStringAdapter Detail:
 protected static boolean isWhiteSpace(char ch) 
    returns true if the specified char is a white space character.
 public String marshal(String s) 
    No-op. Just return the same string given as the parameter.
 public String unmarshal(String text) 
    Removes leading and trailing whitespaces of the string given as the parameter, then truncate any sequnce of tab, CR, LF, and SP by a single whitespace character ' '.