redicl.util

package redicl.util

Value members

Concrete methods

def readNBytes(length: Long, stream: InputStream): Array[Byte]

Allocate a new byte array and read data into it.

Allocate a new byte array and read data into it.

Note: this function has the same name as java.io.InputStream.readNBytes(). It behaves similarly, but diverges in two important points:

  1. it throws RedisProtocolExceptions in case the stream terminates before the requested number of bytes could be read
  2. java.io.InputStream.readNBytes() is not available under Scala native