写一个关于获取网络图片格式的方法 BufferedImage bufferedImage; public static List<String> getImageFormat(InputStream srcInputStream) throws IOException { try { HttpURLConnection connection = (HttpURLConnection) new URL