Package ch.raffael.meldioc.util
Class IOStreams
java.lang.Object
ch.raffael.meldioc.util.IOStreams
Utilties for dealing with I/O streams.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, byte[] buffer, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, int bufferSize, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, byte[] buffer, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, int bufferSize, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, int probeSize, BiFunction<? super byte[], Integer, ? extends R> probeFun) static byte[]readFully(InputStream stream) static byte[]readFully(InputStream stream, int bufferSize) static ByteArrayOutputStreamreadFully(InputStream stream, ByteArrayOutputStream target, byte[] readBuffer)
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
-
Method Details
-
readFully
public static ByteArrayOutputStream readFully(InputStream stream, ByteArrayOutputStream target, byte[] readBuffer) throws IOException - Throws:
IOException
-
readFully
- Throws:
IOException
-
readFully
- Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, byte[] buffer, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, int bufferSize, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, int bufferSize, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-
probe
public static <R> io.vavr.Tuple2<io.vavr.control.Option<R>,InputStream> probe(InputStream stream, io.vavr.control.Option<R> declared, byte[] buffer, int probeSize, BiFunction<? super byte[], Integer, throws IOException? extends R> probeFun) - Throws:
IOException
-