Class IOStreams

java.lang.Object
ch.raffael.meldioc.util.IOStreams

public class IOStreams
extends java.lang.Object
Utilties for dealing with I/O streams.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int DEFAULT_BUFFER_SIZE  
  • Method Summary

    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.ByteArrayOutputStream readFully​(java.io.InputStream stream, java.io.ByteArrayOutputStream target, byte[] readBuffer)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • 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