|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind.annotation.adapters Class NormalizedStringAdapter
java.lang.Object javax.xml.bind.annotation.adapters.XmlAdapter<String,String> javax.xml.bind.annotation.adapters.NormalizedStringAdapter
public final class NormalizedStringAdapter
- extends XmlAdapter<String,String>
Extends:
">XmlAdapter
处理 xs:normalizedString 的
XmlAdapter
。
此适配器移除前导空白和尾部空白,然后用单个空白字符“ ”截断所有制表符、CR 和 LF。
since | JAXB 2.0 |
XmlAdapter
to handle xs:normalizedString.
This adapter removes leading and trailing whitespaces, then replace any tab, CR, and LF by a whitespace character ' '.
- Since:
- JAXB 2.0
- Author:
- Kohsuke Kawaguchi
Constructor Summary | |
---|---|
NormalizedStringAdapter()
|
Method Summary | |
---|---|
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 ' '. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
NormalizedStringAdapter()
英文文档:
NormalizedStringAdapter
public NormalizedStringAdapter()
Method Detail |
---|
public String
unmarshal(String text)
移除作为参数给定的字符串的前导空白和尾部空白,然后用单个空白字符“ ”替换所有制表符、CR 和 LF。
英文文档:
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 ' '.
- Specified by:
unmarshal
in classXmlAdapter<String,String>
- Parameters:
text
- The value to be converted. Can be null.
public String
marshal(String s)
无任何操作。仅返回作为参数提供的字符串。
英文文档:
marshal
public String marshal(String s)
- No-op.
Just return the same string given as the parameter.
- Specified by:
marshal
in classXmlAdapter<String,String>
- Parameters:
s
- The value to be convereted. Can be null.
protected static boolean
isWhiteSpaceExceptSpace(char ch)
如果指定的 char 是空白字符但不是 0x20,则返回 true。
英文文档:
isWhiteSpaceExceptSpace
protected static boolean isWhiteSpaceExceptSpace(char ch)
- Returns true if the specified char is a white space character
but not 0x20.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!