private static byte [ ] getByteArrayFromStream ( final InputStream inputStream ) throws IOException { return new ByteSource ( ) { @ Override public InputStream openStream ( ) { return inputStream ; } } . read ( ) ; }
Gets the byte array from the input stream containing the full data from that stream .