APIdia Launch Partner
Top Description Methods
javax.xml.stream

public Interface Location

Known Direct Implementers
com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXBaseWriter.SAXLocation, com.sun.xml.internal.stream.events.DummyEvent.DummyLocation, com.sun.xml.internal.stream.events.LocationImpl

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.
Author
Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
Since
1.6
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the current offset
getCharacterOffset
()

Return the byte or character offset into the input source this location is pointing to.

public int

Returns:

the current column number
getColumnNumber
()

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

public int

Returns:

the current line number
getLineNumber
()

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

public String

Returns:

the public ID, or null if not available
getPublicId
()

Returns the public ID of the XML

public String

Returns:

the system ID, or null if not available
getSystemId
()

Returns the system ID of the XML

Method Detail

getCharacterOffsetback to summary
public 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:int

the current offset

getColumnNumberback to summary
public int getColumnNumber()

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

Returns:int

the current column number

getLineNumberback to summary
public int getLineNumber()

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

Returns:int

the current line number

getPublicIdback to summary
public String getPublicId()

Returns the public ID of the XML

Returns:String

the public ID, or null if not available

getSystemIdback to summary
public String getSystemId()

Returns the system ID of the XML

Returns:String

the system ID, or null if not available