public interface LocationAware
getPosition()
should return 50; if you are an input stream or file reader, and you've read 25 bytes from the object, then it
should return 25.
In the context of an iterator or any producer-like object that doesn't map directly to a byte stream, getPosition()
should
return the position (in the underlying stream being read/written to) of the most-recently read/written element. For example, if you
are reading lines from a file with a AsciiLineReaderIterator
, calling getPosition()
should return the byte position
of the start of the most recent line returned by AsciiLineReaderIterator.next()
.Modifier and Type | Method and Description |
---|---|
long |
getPosition()
The current offset, in bytes, of this stream/writer/file.
|
long getPosition()