|
JAXB v0.21 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.xml.marshal.ScanPosition | +--javax.xml.marshal.StreamScanPosition
An object describing a scanner's position in an input stream.
A stream-scan position contains a line number and an optional column number and source URI.
Both line and column numbers start at one. Lines are terminated by a LINE FEED character ('\u000A'), a CARRIAGE RETURN character ('\u000D'), or a CARRIAGE-RETURN character followed immediately by a LINE FEED character. Columns are counted in terms of sixteen-bit Unicode characters, in UTF-16, rather than bytes in any particular encoding.
Constructor Summary | |
StreamScanPosition(int line)
Constructs a new scan position with the given line, column, and source URI. |
|
StreamScanPosition(int line,
int col)
Constructs a new scan position with the given line, column, and source URI. |
|
StreamScanPosition(int line,
int col,
String uri)
Constructs a new scan position with the given line, column, and source URI. |
Method Summary | |
int |
column()
Returns this position's column number. |
int |
line()
Returns this position's line number. |
String |
toString()
Returns a string describing this position. |
String |
uriString()
Returns this position's source URI. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StreamScanPosition(int line)
line
- The line number, a positive integerpublic StreamScanPosition(int line, int col)
line
- The line number, a positive integercol
- The column number, or zero
if the column number is not knownpublic StreamScanPosition(int line, int col, String uri)
line
- The line number, a positive integercol
- The column number, or zero
if the column number is not knownuri
- The source URI string, or null
if the source URI is not knownMethod Detail |
public int column()
public int line()
public String toString()
The returned string has the format uri: line i, column j, where uri is the URI, i is the line number, and j is the column number. If the URI is not known then the URI and the colon and space characters that follow it are omitted; if the column number is not known then the column number and the comma and space characters that precede it are omitted.
toString
in class Object
public String uriString()
|
JAXB v0.21 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2001 by Sun Microsystems, Inc., 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.