public static byte[] toByteArray(final InputStream input) throws IOException {
        final ByteArrayOutputStream output = new ByteArrayOutputStream();
        try {
            copy(input, output);
            return output.toByteArray();
        } finally {
            output.toByteArray();
        }
    }
Gets the contents of an InputStream as a byte[].

@param input
@return
@throws IOException
fastexcel-core/src/main/java/cn/idev/excel/util/IoUtils.java