river 0.2.13
Streams interface
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
River
River provides a base interface describing a so-called "stream" interface, this entails the following methods:
read(byte[] buff)
- Reads into the provided buffer,
buff
, at most the number of bytes equal to the length ofbuff
and at least 1 byte - On any error a
StreamException
is thrown
- Reads into the provided buffer,
readFully(byte[] buff)
- Similar to
read(byte[])
except it will block until the number of bytes read is exactly equal to the length ofbuff
- On any error a
StreamException
is thrown
- Similar to
Implementations
To go along with the streams API we also offer a few implementations of useful stream-types which you can use right away (or extend) within your application, these include:
- SockStream
- Provides a streamable access to a
Socket
- Note, only works with
SocketType.STREAM
- Provides a streamable access to a
- PipeStream
- Prvodes a streamable access to a pipe pair of file descriptors
- Note, only supports POSIX-like systems to far
- Registered by Tristan B. Velloza Kildaire
- 0.2.13 released a year ago
- deavmi/river
- LGPL 2
- Copyright © 2023, Tristan B. Velloza Kildaire
- Authors:
- Dependencies:
- none
- Versions:
-
0.3.8 2023-May-26 0.3.7 2023-Apr-30 0.3.6 2023-Apr-29 0.3.5 2023-Apr-29 0.3.4 2023-Apr-29 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
423 downloads total
-
- Score:
- 0.1
- Short URL:
- river.dub.pm