read

open external fun read(buffer: ByteArray): Int

Read data from the source. Returns the number of bytes read from the source. If the returned value is equal to size than this means that all data from the source was consumed.

Return

GemError.Io I/O error

GemError.General any other error