KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > stream > Location


1 package javax.xml.stream;
2
3 /**
4  * Provides information on the location of an event.
5  *
6  * All the information provided by a Location is optional. For example
7  * an application may only report line numbers.
8  *
9  * @version 1.0
10  * @author Copyright (c) 2003 by BEA Systems. All Rights Reserved.
11  * @since 1.6
12  */

13 public interface Location {
14   /**
15    * Return the line number where the current event ends,
16    * returns -1 if none is available.
17    * @return the current line number
18    */

19   int getLineNumber();
20
21   /**
22    * Return the column number where the current event ends,
23    * returns -1 if none is available.
24    * @return the current column number
25    */

26   int getColumnNumber();
27   
28   /**
29    * Return the byte or character offset into the input source this location
30    * is pointing to. If the input source is a file or a byte stream then
31    * this is the byte offset into that stream, but if the input source is
32    * a character media then the offset is the character offset.
33    * Returns -1 if there is no offset available.
34    * @return the current offset
35    */

36   int getCharacterOffset();
37
38   /**
39    * Returns the public ID of the XML
40    * @return the public ID, or null if not available
41    */

42   public String JavaDoc getPublicId();
43
44   /**
45    * Returns the system ID of the XML
46    * @return the system ID, or null if not available
47    */

48   public String JavaDoc getSystemId();
49 }
50
51
52
53
Popular Tags