NormalizedStringAdapter (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.xml.bind.annotation.adapters Class NormalizedStringAdapter

java.lang.Object
  extended by javax.xml.bind.annotation.adapters.XmlAdapter<String,String>
      extended by javax.xml.bind.annotation.adapters.NormalizedStringAdapter

public final class NormalizedStringAdapter
extends XmlAdapter<String,String>

XmlAdapter to handle xs:normalizedString.

This adapter removes leading and trailing whitespaces, then replace any tab, CR, and LF by a whitespace character ' '.

从以下版本开始:
JAXB 2.0
作者:
Kohsuke Kawaguchi

构造器摘要
NormalizedStringAdapter()
           
 
方法摘要
protected static boolean isWhiteSpaceExceptSpace(char ch)
          Returns true if the specified char is a white space character but not 0x20.
 String marshal(String s)
          No-op.
 String unmarshal(String text)
          Removes leading and trailing whitespaces of the string given as the parameter, then replace any tab, CR, and LF by a whitespace character ' '.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造器详细信息

NormalizedStringAdapter

public NormalizedStringAdapter()
方法详细信息

unmarshal

public String unmarshal(String text)
Removes leading and trailing whitespaces of the string given as the parameter, then replace any tab, CR, and LF by a whitespace character ' '.

规范说明:
unmarshal in class XmlAdapter<String,String>
参数:
text - The value to be converted. Can be null.

marshal

public String marshal(String s)
No-op. Just return the same string given as the parameter.

规范说明:
marshal in class XmlAdapter<String,String>
参数:
s - The value to be convereted. Can be null.

isWhiteSpaceExceptSpace

protected static boolean isWhiteSpaceExceptSpace(char ch)
Returns true if the specified char is a white space character but not 0x20.


Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.