Q
qwertmonkey
... You would have to create more complex code if you want to align char
position and byte position.
~
but then why do they have a:
~
docs/api/java/nio/channels/FileChannel.html#position()
~
in the API? How/What is it used for?
~
If you read the FileChannel.position() as you read off the chars from the
CharBuffer you always get 0 (as if the offset pointer in the underlying
FileChannel would not advance)
~
I am using:
~
$ java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode)
~
lbrtchx
position and byte position.
~
but then why do they have a:
~
docs/api/java/nio/channels/FileChannel.html#position()
~
in the API? How/What is it used for?
~
If you read the FileChannel.position() as you read off the chars from the
CharBuffer you always get 0 (as if the offset pointer in the underlying
FileChannel would not advance)
~
I am using:
~
$ java -version
java version "1.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode)
~
lbrtchx