A stream of binary data

Introduced properties

private var _big_endian: Bool

binary :: BinaryStream :: _big_endian

Use the big-endian convention? otherwise use little-endian.
fun big_endian: Bool

binary :: BinaryStream :: big_endian

Use the big-endian convention? otherwise use little-endian.
fun big_endian=(big_endian: Bool)

binary :: BinaryStream :: big_endian=

Use the big-endian convention? otherwise use little-endian.

Redefined properties

redef type SELF: BinaryStream

binary $ BinaryStream :: SELF

Type of this instance, automatically specialized in every class

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
private var _big_endian: Bool

binary :: BinaryStream :: _big_endian

Use the big-endian convention? otherwise use little-endian.
private var _codec: Codec

core :: Stream :: _codec

Codec used to transform raw data to text
private var _last_error: nullable IOError

core :: Stream :: _last_error

Error produced by the file stream
private var _lookahead: CString

core :: Stream :: _lookahead

Lookahead buffer for codecs
private var _lookahead_capacity: Int

core :: Stream :: _lookahead_capacity

Capacity of the lookahead
private var _lookahead_length: Int

core :: Stream :: _lookahead_length

Current occupation of the lookahead
private var _write_buffer: CString

core :: Stream :: _write_buffer

Buffer for writing data to a stream
fun big_endian: Bool

binary :: BinaryStream :: big_endian

Use the big-endian convention? otherwise use little-endian.
fun big_endian=(big_endian: Bool)

binary :: BinaryStream :: big_endian=

Use the big-endian convention? otherwise use little-endian.
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.
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
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
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 binary::BinaryStream BinaryStream core::Stream Stream binary::BinaryStream->core::Stream core::Object Object core::Stream->core::Object ...core::Object ... ...core::Object->core::Object core::Writer Writer core::Writer->binary::BinaryStream core::Reader Reader core::Reader->binary::BinaryStream core::FileWriter FileWriter core::FileWriter->core::Writer core::Duplex Duplex core::Duplex->core::Writer core::Duplex->core::Reader core::BytesWriter BytesWriter core::BytesWriter->core::Writer core::ProcessWriter ProcessWriter core::ProcessWriter->core::Writer core::WriterProtocol WriterProtocol core::WriterProtocol->core::Writer filter_stream::FilterWriter FilterWriter filter_stream::FilterWriter->core::Writer libevent::Connection Connection libevent::Connection->core::Writer core::FileWriter... ... core::FileWriter...->core::FileWriter core::Duplex... ... core::Duplex...->core::Duplex core::BytesWriter... ... core::BytesWriter...->core::BytesWriter core::ProcessWriter... ... core::ProcessWriter...->core::ProcessWriter core::WriterProtocol... ... core::WriterProtocol...->core::WriterProtocol filter_stream::FilterWriter... ... filter_stream::FilterWriter...->filter_stream::FilterWriter libevent::Connection... ... libevent::Connection...->libevent::Connection core::PollableReader PollableReader core::PollableReader->core::Reader core::BytesReader BytesReader core::BytesReader->core::Reader core::ProcessReader ProcessReader core::ProcessReader->core::Reader core::ReaderProtocol ReaderProtocol core::ReaderProtocol->core::Reader filter_stream::FilterReader FilterReader filter_stream::FilterReader->core::Reader core::PollableReader... ... core::PollableReader...->core::PollableReader core::BytesReader... ... core::BytesReader...->core::BytesReader core::ProcessReader... ... core::ProcessReader...->core::ProcessReader core::ReaderProtocol... ... core::ReaderProtocol...->core::ReaderProtocol filter_stream::FilterReader... ... filter_stream::FilterReader...->filter_stream::FilterReader

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

abstract class Reader

core :: Reader

A Stream that can be read from
abstract class Writer

core :: Writer

A Stream that can be written to

Descendants

class BytesReader

core :: BytesReader

Read from bytes in memory
class BytesWriter

core :: BytesWriter

Write to bytes in memory
class Connection

libevent :: Connection

Spawned to manage a specific connection
abstract class Duplex

core :: Duplex

A Stream that can be written to and read from
class DuplexProtocol

core :: DuplexProtocol

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

libevent :: EchoConnection

Connection echoing data received from clients back at them
class FileReader

core :: FileReader

Stream that can read from a File
class FileWriter

core :: FileWriter

Stream that can write to a File
class HTTPConnection

nitcorn :: HTTPConnection

Connection rebuilding HTTP requests
class HttpServer

nitcorn :: HttpServer

A server handling a single connection
abstract class PollableReader

core :: PollableReader

Reader capable of declaring if readable without blocking
class ProcessDuplex

core :: ProcessDuplex

Process on which stdout can be read and stdin can be written to like a Duplex
class ProcessReader

core :: ProcessReader

Process on which the stdout is readable like a Reader
class ProcessWriter

core :: ProcessWriter

Process on which stdin is writable like a Writer
class ReaderProtocol

core :: ReaderProtocol

Reader decorator over a read-capable stream
class Stderr

core :: Stderr

Standard error stream.
class Stdin

core :: Stdin

Standard input stream.
class Stdout

core :: Stdout

Standard output stream.
class StringReader

core :: StringReader

Stream reading from a String source
class StringWriter

core :: StringWriter

Stream writing to a String
class TCPStream

socket :: TCPStream

Simple communication stream with a remote socket
class WebsocketConnection

websocket :: WebsocketConnection

Connection to a websocket client
class WriterProtocol

core :: WriterProtocol

Writer decorator over a write-capable stream

Class definitions

binary $ BinaryStream
# A stream of binary data
abstract class BinaryStream
	super Stream

	# Use the big-endian convention? otherwise use little-endian.
	#
	# By default, `true` to use big-endian.
	var big_endian = true is writable
end
lib/binary/binary.nit:59,1--67,3