PHP 인터페이스 Swift_InputByteStream, Halite

Classes implementing this interface may use a subsystem which requires less memory than working with large strings of data.
저자: Chris Corbyn
파일 보기 프로젝트 열기: HaliteChallenge/Halite 0 사용 예제들

공개 메소드들

메소드 설명
bind ( Swift_InputByteStream $is ) Attach $is to this stream.
commit ( ) For any bytes that are currently buffered inside the stream, force them off the buffer.
flushBuffers ( ) Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
unbind ( Swift_InputByteStream $is ) Remove an already bound stream.
write ( string $bytes ) : integer Writes $bytes to the end of the stream.

메소드 상세

bind() 공개 메소드

The stream acts as an observer, receiving all data that is written. All {@link write()} and {@link flushBuffers()} operations will be mirrored.
public bind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

commit() 공개 메소드

For any bytes that are currently buffered inside the stream, force them off the buffer.
public commit ( )

flushBuffers() 공개 메소드

Flush the contents of the stream (empty it) and set the internal pointer to the beginning.
public flushBuffers ( )

unbind() 공개 메소드

If $is is not bound, no errors will be raised. If the stream currently has any buffered data it will be written to $is before unbinding occurs.
public unbind ( Swift_InputByteStream $is )
$is Swift_InputByteStream

write() 공개 메소드

Writing may not happen immediately if the stream chooses to buffer. If you want to write these bytes with immediate effect, call {@link commit()} after calling write(). This method returns the sequence ID of the write (i.e. 1 for first, 2 for second, etc etc).
public write ( string $bytes ) : integer
$bytes string
리턴 integer