This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


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.


Method Summary
 int

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

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

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

          Returns the public ID of the XML
 String

          Returns the system ID of the XML
 

Method Detail

getCharacterOffset

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:
the current offset

getColumnNumber

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

Returns:
the current column number

getLineNumber

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

Returns:
the current line number

getPublicId

public String getPublicId()
Returns the public ID of the XML

Returns:
the public ID, or null if not available

getSystemId

public String getSystemId()
Returns the system ID of the XML

Returns:
the system ID, or null if not available


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.