package io
- Alphabetic
- By Inheritance
- io
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
readInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit arg0: Suspendable[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize.Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize. SetcloseAfterUseto false if theInputStreamshould not be closed after use.Blocks the current thread.
-
def
readInputStreamAsync[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit F: Async[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize.Reads all bytes from the specified
InputStreamwith a buffer size ofchunkSize. SetcloseAfterUseto false if theInputStreamshould not be closed after use.This will block a thread in the current
Asyncinstance, so the size of any associated threadpool should be sized appropriately. -
def
stdin[F[_]](bufSize: Int)(implicit F: Suspendable[F]): Stream[F, Byte]
Stream of bytes read from standard input.
-
def
stdinAsync[F[_]](bufSize: Int)(implicit F: Async[F]): Stream[F, Byte]
Stream of bytes read asynchronously from standard input.
-
def
stdout[F[_]](implicit F: Suspendable[F]): Sink[F, Byte]
Sink of bytes that writes emitted values to standard output.
-
def
stdoutAsync[F[_]](implicit F: Async[F]): Sink[F, Byte]
Sink of bytes that writes emitted values to standard output asynchronously.
-
def
toInputStream[F[_]](implicit F: Async[F]): Pipe[F, Byte, InputStream]
Pipe that converts a stream of bytes to a stream that will emits a single
java.io.InputStream, that is closed whenever the resulting stream terminates.Pipe that converts a stream of bytes to a stream that will emits a single
java.io.InputStream, that is closed whenever the resulting stream terminates.If the
closeof resulting input stream is invoked manually, then this will await until the original stream completely terminates.Because all
InputStreammethods block (includingclose), the resultingInputStreamshould be consumed on a different thread pool than the one that is backingAsync[F].Note that the implementation is not thread safe -- only one thread is allowed at any time to operate on the resulting
java.io.InputStream. -
def
writeOutputStream[F[_]](fos: F[OutputStream], closeAfterUse: Boolean = true)(implicit arg0: Suspendable[F]): Sink[F, Byte]
Writes all bytes to the specified
OutputStream.Writes all bytes to the specified
OutputStream. SetcloseAfterUseto false if theOutputStreamshould not be closed after use.Blocks the current thread.
-
def
writeOutputStreamAsync[F[_]](fos: F[OutputStream], closeAfterUse: Boolean = true)(implicit F: Async[F]): Sink[F, Byte]
Writes all bytes to the specified
OutputStream.Writes all bytes to the specified
OutputStream. SetcloseAfterUseto false if theOutputStreamshould not be closed after use.This will block a thread in the current
Asyncinstance, so the size of any associated threadpool should be sized appropriately.