现有如下这段代码,我的意图是通过文件选择框选择一幅图片,然后将选择的file对象转换为Blob类型的photo中,然后将photo存入student对象的方法public void setPhoto(Blob photo)中。请高手们帮忙指点迷津。private void exploreButtonActionPerformed(java.awt.event.ActionEvent evt) {                                              
        MyFileChooser chooser = new MyFileChooser();
        int returnVal = chooser.showOpenDialog(this);
        Blob photo = null;
        if (returnVal == JFileChooser.APPROVE_OPTION) {        
            File file = chooser.getSelectedFile();
            try {
                BufferedImage image = ImageIO.read(file);
                picLabel.setIcon(new ImageIcon(image.getScaledInstance(128, 128, Image.SCALE_DEFAULT)));
                //如何编写file和photo之间的转换代码
                stu.setPhoto(photo);
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }