TFramedTransport class

Framed TTransport.

Adapted from the Java Framed transport.

Inheritance

Constructors

TFramedTransport.new(TTransport transport, [int maxLength = DEFAULT_MAX_LENGTH])

Properties

hashCode int
The hash code for this object.
no setterinherited
i32buf Int8List
final
inFrame bool
Marks the end of the a message, if applicable.
getter/setter pairinherited
isOpen bool
Queries whether the transport is open. Returns true if the transport is open.
no setteroverride
maxLength_ int
getter/setter pair
readBuffer_ TMemoryInputTransport?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transport_ TTransport
getter/setter pair
writeBuffer_ TByteArrayOutputStream
getter/setter pair

Methods

close() Future
Closes the transport.
override
consumeBuffer(int len) → void
Consume len bytes from the buffer.
override
flush([bool oneway = false]) Future
Flush any pending data out of a transport buffer. Throws TTransportError if there was an error writing out data.
override
getBuffer() Int8List?
Returns the bytes list
override
getBufferPosition() int
Returns the position in the buffer.
override
getBytesRemainingInBuffer() int
Returns the number of bytes available in the write buffer.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() Future
Opens the transport for reading/writing. Throws TTransportError if the transport could not be opened.
override
read(Int8List buffer, int offset, int length) int
Reads up to length bytes into buffer, starting at offset. Returns the number of bytes actually read. Throws TTransportError if there was an error reading data
override
readAll(Int8List buffer, int offset, int length) int
Guarantees that all of length bytes are actually read off the transport. Returns the number of bytes actually read, which must be equal to length. Throws TTransportError if there was an error reading data
inherited
readFrame() Future
toString() String
A string representation of this object.
inherited
write(Int8List buffer, int offset, int length) → void
Writes up to len bytes from the buffer. Throws TTransportError if there was an error writing data
override
writeAll(Int8List buffer) → void
Writes the bytes to the output. Throws TTransportError if there was an error writing data
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

decodeShort(Int8List buf, int off) int
Decode a big-endian 16-bit integer from an Int8List.
decodeWord(Int8List buf, [int off = 0]) int
Decode a big-endian 32-bit integer from an Int8List.
encodeShort(int value, Int8List buf) → void
Encode a big-endian 16-bit integer into an Int8List.
encodeWord(int n, Int8List buf, [int off = 0]) → void
Encode a big-endian 32-bit integer into an Int8List.

Constants

DEFAULT_MAX_LENGTH → const int