Top Description Fields Constructors Methods
com.sun.xml.internal.stream.events

public Class LocationImpl

extends Object
implements Location
Class Inheritance
All Implemented Interfaces
javax.xml.stream.Location
Imports
javax.xml.stream.Location

Implementation of Location interface to be used by event readers.
Author
Neeraj bajaj,k venugopal

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int
pack-priv int
pack-priv String
pack-priv String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public int
getCharacterOffset()

Implements javax.xml.stream.Location.getCharacterOffset.

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

public int
getColumnNumber()

Implements javax.xml.stream.Location.getColumnNumber.

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

public int
getLineNumber()

Implements javax.xml.stream.Location.getLineNumber.

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

public String
getPublicId()

Implements javax.xml.stream.Location.getPublicId.

Returns the public ID of the XML

public String
getSystemId()

Implements javax.xml.stream.Location.getSystemId.

Returns the system ID of the XML

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

charOffsetback to summary
pack-priv int charOffset
colNoback to summary
pack-priv int colNo
lineNoback to summary
pack-priv int lineNo
publicIdback to summary
pack-priv String publicId
systemIdback to summary
pack-priv String systemId

Constructor Detail

LocationImplback to summary
pack-priv LocationImpl(Location loc)

Method Detail

getCharacterOffsetback to summary
public int getCharacterOffset()

Implements javax.xml.stream.Location.getCharacterOffset.

Doc from javax.xml.stream.Location.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()

Implements javax.xml.stream.Location.getColumnNumber.

Doc from javax.xml.stream.Location.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()

Implements javax.xml.stream.Location.getLineNumber.

Doc from javax.xml.stream.Location.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()

Implements javax.xml.stream.Location.getPublicId.

Doc from javax.xml.stream.Location.getPublicId.

Returns the public ID of the XML

Returns:String

the public ID, or null if not available

getSystemIdback to summary
public String getSystemId()

Implements javax.xml.stream.Location.getSystemId.

Doc from javax.xml.stream.Location.getSystemId.

Returns the system ID of the XML

Returns:String

the system ID, or null if not available

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object