|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.stream Interface Location
public interface Location
提供有关事件位置的信息。Location 提供的所有信息都是可选的。例如,应用程序可以只报告行号。
version | 1.0 |
Provides information on the location of an event. All the information provided by a Location is optional. For example an application may only report line numbers.
- Version:
- 1.0
- Author:
- Copyright (c) 2003 by BEA Systems. All Rights Reserved.
Method Summary | |
---|---|
int |
getCharacterOffset()
Return the byte or character offset into the input source this location is pointing to. |
int |
getColumnNumber()
Return the column number where the current event ends, returns -1 if none is available. |
int |
getLineNumber()
Return the line number where the current event ends, returns -1 if none is available. |
String |
getPublicId()
Returns the public ID of the XML |
String |
getSystemId()
Returns the system ID of the XML |
Method Detail |
---|
public int
getLineNumber()
返回当前事件结束位置的行号,如果没有可用的行号,则返回 -1。
return | 当前行号 |
getLineNumber
int getLineNumber()
- Return the line number where the current event ends,
returns -1 if none is available.
- Returns:
- the current line number
public int
getColumnNumber()
返回当前事件结束位置的列号,如果没有可用的列号,则返回 -1。
return | 当前列号 |
getColumnNumber
int getColumnNumber()
- Return the column number where the current event ends,
returns -1 if none is available.
- Returns:
- the current column number
public int
getCharacterOffset()
返回此位置所指向的输入源中的字节或字符偏移量。如果输入源是一个文件或字节流,则偏移量为该流中的字节偏移量;但如果输入源是字符介质,则偏移量为字符偏移量。如果没有可用的偏移量,则返回 -1。
return | 当前偏移量 |
getCharacterOffset
int getCharacterOffset()
- Return the byte or character offset into the input source this location
is pointing to. If the input source is a file or a byte stream then
this is the byte offset into that stream, but if the input source is
a character media then the offset is the character offset.
Returns -1 if there is no offset available.
- Returns:
- the current offset
public String
getPublicId()
返回 XML 的公共 ID
return | 公共 ID,如果不可用,则返回 null |
getPublicId
String getPublicId()
- Returns the public ID of the XML
- Returns:
- the public ID, or null if not available
public String
getSystemId()
返回 XML 的系统 ID
return | 系统 ID,如果不可用,则返回 null |
getSystemId
String getSystemId()
- Returns the system ID of the XML
- Returns:
- the system ID, or null if not available
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!