Class InputStreams


  • public final class InputStreams
    extends java.lang.Object
    Utilities for InputStreams.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private InputStreams()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] readFully​(java.io.InputStream is)
      Reads all bytes from an input stream into a byte array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InputStreams

        private InputStreams()
    • Method Detail

      • readFully

        public static byte[] readFully​(java.io.InputStream is)
                                throws java.io.IOException
        Reads all bytes from an input stream into a byte array. The provided InputStream is not closed by this method.
        Parameters:
        is - the input stream to read from
        Returns:
        a byte array containing all the bytes from the stream
        Throws:
        java.io.IOException - if an I/O error occurs