ByteBufferInputStream.read doesn't properly convert bytes, close #1333