antibiotics11 / stream
IO Stream classes mimicking java.io
dev-main
2024-06-08 13:14 UTC
Requires
- php: >=8.3.0
Requires (Dev)
This package is auto-updated.
Last update: 2025-03-08 14:55:31 UTC
README
IO Stream classes mimicking java.io
use antibiotics11\Stream\FileOutputStream; $helloWorldFile = new FileOutputStream(name: "hello_world.txt", append: true); for ($i = 0; $i < 10; $i++) { $helloWorldFile->write(bytes: "Hello, World!\r\n"); } $helloWorldFile->flush(); $helloWorldFile->close();
Classes
- Stream\InputStream
- Stream\OutputStream
- Stream\FileInputStream
- Stream\FileOutputStream
- Stream\BufferedOutputStream
Stream\StandardInputStream[Deprecated]Stream\StandardOutputStream[Deprecated]
Exceptions
- Stream\Exception\IOException
- Stream\Exception\FileNotFoundException
Notice
- This project is experimental and does not guarantee the same functionality as java.io.
- Some features may be unstable due to mimicking method overloading with optional parameters.
Requirements
- PHP >= 8.3
- jetbrains/phpstorm-attributes >= 1.0
Installation
composer require antibiotics11/stream:dev-main