-
public final class MobonOkioEssential APIs for working with MobonOkio.
-
-
Method Summary
Modifier and Type Method Description static BufferedSourcebuffer(Source source)Returns a new source that buffers reads from {@code source}.static BufferedSinkbuffer(Sink sink)Returns a new sink that buffers writes to {@code sink}.static Sinksink(OutputStream out)Returns a sink that writes to {@code out}.static Sinksink(Socket socket)Returns a sink that writes to {@code socket}.static Sourcesource(InputStream in)Returns a source that reads from {@code in}.static Sourcesource(File file)Returns a source that reads from {@code file}.static Sourcesource(Path path, Array<OpenOption> options)Returns a source that reads from {@code path}.static Sinksink(File file)Returns a sink that writes to {@code file}.static SinkappendingSink(File file)Returns a sink that appends to {@code file}.static Sinksink(Path path, Array<OpenOption> options)Returns a sink that writes to {@code path}.static Sinkblackhole()Returns a sink that writes nowhere. static Sourcesource(Socket socket)Returns a source that reads from {@code socket}.-
-
Method Detail
-
buffer
static BufferedSource buffer(Source source)
Returns a new source that buffers reads from
{@code source}. The returnedsource will perform bulk reads into its in-memory buffer. Use this whereveryou read a source to get an ergonomic and efficient access to data.
-
buffer
static BufferedSink buffer(Sink sink)
Returns a new sink that buffers writes to
{@code sink}. The returned sinkwill batch writes to{@code sink}. Use this wherever you write to a sink toget an ergonomic and efficient access to data.
-
sink
static Sink sink(OutputStream out)
Returns a sink that writes to
{@code out}.
-
source
static Source source(InputStream in)
Returns a source that reads from
{@code in}.
-
source
static Source source(Path path, Array<OpenOption> options)
Returns a source that reads from
{@code path}.
-
appendingSink
static Sink appendingSink(File file)
Returns a sink that appends to
{@code file}.
-
sink
static Sink sink(Path path, Array<OpenOption> options)
Returns a sink that writes to
{@code path}.
-
-
-
-