atilika / kuromoji

Kuromoji is a self-contained and very easy to use Japanese morphological analyzer designed for search
Apache License 2.0
950 stars 131 forks source link

Update to NIO read methods to support Android implementation #100

Closed gerryhocks closed 8 years ago

gerryhocks commented 8 years ago

This update alters the NIO calls to make them compatible with Android, which does not always read buffers to completion.

It also alters the routines so that all logical reads are done via a streams 'outermost' wrapper to ensure different data is actually read sequentially.

Additionally, some BufferedInputStream wrappers in some of the deeper methods have been moved up.

These changes have been successfully tested on Android API 22.

cmoen commented 8 years ago

Thanks a lot, Gerry! I'm merging this.