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