Class ByteArrayIOUtil

java.lang.Object
org.jboss.shrinkwrap.api.internal.ByteArrayIOUtil

public class ByteArrayIOUtil extends Object
Utility class that helps get byte array from InputStream.

This is an internal class not part of the public ShrinkWrap API.

Version:
$Revision: $
Author:
Ken Gullaksen
  • Constructor Details

    • ByteArrayIOUtil

      public ByteArrayIOUtil()
  • Method Details

    • asByteArray

      public static byte[] asByteArray(InputStream in) throws IllegalArgumentException
      Obtains the contents of the specified stream as a byte array
      Parameters:
      in - InputStream
      Returns:
      the byte[] for the given InputStream
      Throws:
      IllegalArgumentException - If the stream was not specified