Class IOStreams


  • public class IOStreams
    extends java.lang.Object
    Utilties for dealing with I/O streams.
    • 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.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
    • 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