Is there an API to read characters from a file or must I read into a
ByteBuffer, using a Reader, and then transform with a Charset to a
String (or CharacterBuffer)?
If the latter, how do I treat read bytes at the end of the ByteBuffer
that are not completely used for a multibyte character? The
documentation just says Charset.decode decodes all of input, returning
all of the output, but what happens if the last part of input needs the
first part of the next input to produce an output?
I'm also a bit confused about the Reader in ceylon.buffers, the
ReadableFileDescriptor and FileDescriptorReader in
ceylon.io and the
Reader in ceylon.file. What is the preferred way to implement something
envolving reading of resources to have it the most versatile way so
that it can read files, sockets, anything?
And is there really no file or other i/o for javascript? Maybe I just
don't know where to start looking.
Thanks, Dirk.