Stream class used as a Decorator over a stream

Introduced properties

init defaultinit(origin: STREAM)

core :: Protocol :: defaultinit

protected fun origin=(origin: STREAM)

core :: Protocol :: origin=

Redefined properties

redef type SELF: Protocol

core $ Protocol :: SELF

Type of this instance, automatically specialized in every class
redef fun close

core $ Protocol :: close

close the stream

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
abstract fun close

core :: Stream :: close

close the stream
fun codec: Codec

core :: Stream :: codec

Codec used to transform raw data to text
fun codec=(c: Codec)

core :: Stream :: codec=

Change the codec for this stream.
init defaultinit(origin: STREAM)

core :: Protocol :: defaultinit

fun finish

core :: Stream :: finish

Post-work hook.
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun last_error: nullable IOError

core :: Stream :: last_error

Error produced by the file stream
protected fun last_error=(last_error: nullable IOError)

core :: Stream :: last_error=

Error produced by the file stream
protected fun lookahead: CString

core :: Stream :: lookahead

Lookahead buffer for codecs
protected fun lookahead=(lookahead: CString)

core :: Stream :: lookahead=

Lookahead buffer for codecs
protected fun lookahead_capacity: Int

core :: Stream :: lookahead_capacity

Capacity of the lookahead
protected fun lookahead_capacity=(lookahead_capacity: Int)

core :: Stream :: lookahead_capacity=

Capacity of the lookahead
protected fun lookahead_length: Int

core :: Stream :: lookahead_length

Current occupation of the lookahead
protected fun lookahead_length=(lookahead_length: Int)

core :: Stream :: lookahead_length=

Current occupation of the lookahead
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
protected fun origin=(origin: STREAM)

core :: Protocol :: origin=

fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
protected fun set_codec(codec: Codec)

core :: Stream :: set_codec

Codec used to transform raw data to text
fun start

core :: Stream :: start

Pre-work hook.
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
protected fun write_buffer: CString

core :: Stream :: write_buffer

Buffer for writing data to a stream
protected fun write_buffer=(write_buffer: CString)

core :: Stream :: write_buffer=

Buffer for writing data to a stream
package_diagram core::Protocol Protocol core::Stream Stream core::Protocol->core::Stream core::Object Object core::Stream->core::Object ...core::Object ... ...core::Object->core::Object core::ReaderProtocol ReaderProtocol core::ReaderProtocol->core::Protocol core::WriterProtocol WriterProtocol core::WriterProtocol->core::Protocol core::DuplexProtocol DuplexProtocol core::DuplexProtocol->core::ReaderProtocol core::DuplexProtocol->core::WriterProtocol core::DuplexProtocol... ... core::DuplexProtocol...->core::DuplexProtocol

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

abstract class Stream

core :: Stream

Any kind of stream to read/write/both to or from a source

Children

class ReaderProtocol

core :: ReaderProtocol

Reader decorator over a read-capable stream
class WriterProtocol

core :: WriterProtocol

Writer decorator over a write-capable stream

Descendants

class DuplexProtocol

core :: DuplexProtocol

Reader/Writer decorator over a duplex-capable stream
class WebsocketConnection

websocket :: WebsocketConnection

Connection to a websocket client

Class definitions

core $ Protocol
# Stream class used as a Decorator over a stream
class Protocol
	super Stream

	type STREAM: Stream

	var origin: STREAM

	redef fun close do origin.close
end
lib/core/protocol.nit:13,1--22,3