Location (Java EE 5 SDK)

Java

Java EE 5 SDK

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


javax.xml.stream Interface Location


public interface Location

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.

版本:
1.0
作者:
Copyright (c) 2003 by BEA Systems. All Rights Reserved.

方法摘要
 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
 

方法详细信息

getLineNumber

int getLineNumber()
Return the line number where the current event ends, returns -1 if none is available.

返回:
the current line number

getColumnNumber

int getColumnNumber()
Return the column number where the current event ends, returns -1 if none is available.

返回:
the current column number

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.

返回:
the current offset

getPublicId

String getPublicId()
Returns the public ID of the XML

返回:
the public ID, or null if not available

getSystemId

String getSystemId()
Returns the system ID of the XML

返回:
the system ID, or null if not available

Java EE 5 SDK

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


提交错误或意见

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