code: public static byte[] readStream(final InputStream inStream) {
  		try {
  			return IOUtils.toByteArray(inStream);
  		} catch (IOException e) {
  			throw new JKException(e);
  		}
  		//
  		// try {
  		// DataInputStream in = null;
  		// try {
  		// in = new DataInputStream(inStream);
  		// int ch;
  		//
  		// List<Byte> bytes=new ArrayList<>();
  		// while((ch=in.read())!=-1){
  		// bytes.add(ch);
  		// }
  		// return arr;
  		// } finally {
  		// if (in != null) {
  		// in.close();
  		// }
  		// }
  		// } catch (final IOException e) {
  		// throw new RuntimeException(e);
  		// }
  	}
docs: Read stream.
  
  @param inStream the in stream
  @return the byte[]