1 | <?php |
||
12 | class OutputStreamWriter |
||
13 | { |
||
14 | /** |
||
15 | * @var OutputStream 出力ストリーム |
||
16 | */ |
||
17 | protected $stream; |
||
18 | |||
19 | /** |
||
20 | * constructor |
||
21 | * @param OutputStream $stream 出力ストリーム |
||
22 | */ |
||
23 | public function __construct(OutputStream $stream) |
||
27 | |||
28 | /** |
||
29 | * destructor |
||
30 | */ |
||
31 | public function __destruct() |
||
35 | |||
36 | /** |
||
37 | * バッファリングしているすべての出力バイトを書き出し、出力ストリームを閉じる |
||
38 | * @throws WebStream\Exception\Extend\IOException |
||
39 | */ |
||
40 | public function close() |
||
44 | |||
45 | /** |
||
46 | * 出力ストリームに書き出す |
||
47 | * @param mixed $buf 出力データ |
||
48 | * @param int $off データ開始位置 |
||
49 | * @param int $len 書き出すバイト数 |
||
50 | * @throws WebStream\Exception\Extend\IOException |
||
51 | */ |
||
52 | public function write($buf, int $off = null, int $len = null) |
||
56 | |||
57 | /** |
||
58 | * 改行を書き出す |
||
59 | * @throws WebStream\Exception\Extend\IOException |
||
60 | */ |
||
61 | public function newLine() |
||
65 | |||
66 | /** |
||
67 | * バッファリングしているすべての出力バイトを出力ストリームを閉じずに強制的に書き出す |
||
68 | * writeを実行した時点では書き出されておらず、flushした時点ですべて書き出す |
||
69 | * @throws WebStream\Exception\Extend\IOException |
||
70 | */ |
||
71 | public function flush() |
||
75 | } |
||
76 |