private static String readQRCode(File filePath, Map hintMap) {
    """
	读取二维码信息
	
	@param filePath 文件路径
	@param hintMap  hintMap
	@return 二维码内容
    """
        try {
            BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer(
                    new BufferedImageLuminanceSource(ImageIO.read(new FileInputStream(filePath)))));

            Result qrCodeResult = new MultiFormatReader().decode(binaryBitmap, hintMap);
            return qrCodeResult.getText();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
private static String readQRCode(File filePath, Map hintMap) {
        try {
            BinaryBitmap binaryBitmap = new BinaryBitmap(new HybridBinarizer(
                    new BufferedImageLuminanceSource(ImageIO.read(new FileInputStream(filePath)))));

            Result qrCodeResult = new MultiFormatReader().decode(binaryBitmap, hintMap);
            return qrCodeResult.getText();
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
private static String readQRCode ( File filePath , Map hintMap ) { try { BinaryBitmap binaryBitmap = new BinaryBitmap ( new HybridBinarizer ( new BufferedImageLuminanceSource ( ImageIO . read ( new FileInputStream ( filePath ) ) ) ) ) ; Result qrCodeResult = new MultiFormatReader ( ) . decode ( binaryBitmap , hintMap ) ; return qrCodeResult . getText ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; return null ; } }
读取二维码信息

@param filePath 文件路径
@param hintMap  hintMap
@return 二维码内容
读取二维码信息