SourceTextOps

ox.channels.SourceTextOps
trait SourceTextOps[+T]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Source[T]
class Channel[T]
Self type
Source[T]

Members list

Value members

Concrete methods

def decodeStringUtf8(using Ox, T <:< Chunk[Byte]): Source[String]

Decodes a stream of chunks of bytes into UTF-8 Strings. This function is able to handle UTF-8 characters encoded on multiple bytes that are split across chunks.

Decodes a stream of chunks of bytes into UTF-8 Strings. This function is able to handle UTF-8 characters encoded on multiple bytes that are split across chunks.

Attributes

Returns

a source of Strings decoded from incoming bytes.

def encodeUtf8(using Ox, T <:< String): Source[Chunk[Byte]]

Encodes a source of String in to a source of bytes using UTF-8.

Encodes a source of String in to a source of bytes using UTF-8.

Attributes

def lines(charset: Charset)(using Ox, T <:< Chunk[Byte]): Source[String]

Transforms a Source of byte chunks such that each emitted String is a text line from the input.

Transforms a Source of byte chunks such that each emitted String is a text line from the input.

Value parameters

charset

the charset to use for decoding the bytes into text.

Attributes

Returns

a Source emitting lines read from the input byte chunks, assuming they represent text.

def linesUtf8(using Ox, T <:< Chunk[Byte]): Source[String]

Transforms a Source of byte chunks such that each emitted String is a text line from the input decoded using UTF-8 charset.

Transforms a Source of byte chunks such that each emitted String is a text line from the input decoded using UTF-8 charset.

Attributes

Returns

a Source emitting lines read from the input byte chunks, assuming they represent text.