Overview

Packages

  • None
  • thrift
    • transport

Classes

  • TBufferedTransport
  • TFramedTransport
  • THttpClient
  • TMemoryBuffer
  • TNullTransport
  • TPhpStream
  • TSocket
  • TSocketPool
  • TTransport
  • Overview
  • Package
  • Class
  • Tree

Class TMemoryBuffer

A memory buffer is a tranpsort that simply reads from and writes to an in-memory string buffer. Anytime you call write on it, the data is simply placed into a buffer, and anytime you call read, data is read from that buffer.

TTransport
Extended by TMemoryBuffer
Package: thrift\transport
Author: Levy Klots lklots@facebook.com
Located at Horde/Thrift/thrift_root/transport/TMemoryBuffer.php
Methods summary
public
# __construct( mixed $buf = '' )

Constructor. Optionally pass an initial value for the buffer.

Constructor. Optionally pass an initial value for the buffer.

public boolean
# isOpen( )

Whether this transport is open.

Whether this transport is open.

Returns

boolean
true if open
public
# open( )

Open the transport for reading/writing

Open the transport for reading/writing

Throws

TTransportException
if cannot open
public
# close( )

Close the transport.

Close the transport.

public
# write( string $buf )

Writes the given data out.

Writes the given data out.

Parameters

$buf
The data to write

Throws

TTransportException
if writing fails
public string
# read( integer $len )

Read some data into the array.

Read some data into the array.

Parameters

$len
How much to read

Returns

string
The data that has been read

Throws

TTransportException
if cannot read any more data
public
# getBuffer( )
public
# available( )
Methods inherited from TTransport
flush(), readAll()
API documentation generated by ApiGen