IO Stream classes mimicking java.io

dev-main 2024-06-08 13:14 UTC

This package is auto-updated.

Last update: 2024-06-08 13:15:02 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

Installation

composer require antibiotics11/stream:dev-main