inputStream.close();
    public static byte[] getByteContent(InputStream inputStream)            throws IOException {        ByteArrayOutputStream outputStream = new ByteArrayOutputStream(                16 * 1024);        byte[] buffer = new byte[1024];        int byteCount = -1;        byte[] data = null;        // Read the byte content into the output stream first        while ((byteCount = inputStream.read(buffer)) > 0) {            outputStream.write(buffer, 0, byteCount);        }        // Set data with byte content from stream        data = outputStream.toByteArray();        // Release resources        inputStream.close();        outputStream.close();        return data;    }