Java 我需要一个方法来知道有多少图像的用户采取瘦附加的图像,如果没有发送其他信息

Java 我需要一个方法来知道有多少图像的用户采取瘦附加的图像,如果没有发送其他信息,java,api,android-studio,email,attachment,Java,Api,Android Studio,Email,Attachment,此应用程序用于通过填写姓名、地址和电子邮件发送报价,然后用户最多可以拍摄6张图像,然后通过提交这些信息以及通过电子邮件发送: 她是附件部分: messageBodyPart = new MimeBodyPart(); String filename = "address of the image that stored on the phone taken by the user .jpg"; DataSource source = new FileData

此应用程序用于通过填写姓名、地址和电子邮件发送报价,然后用户最多可以拍摄6张图像,然后通过提交这些信息以及通过电子邮件发送:

她是附件部分:

messageBodyPart = new MimeBodyPart();
String filename = "address of the image that stored on the phone taken by the user .jpg";

        DataSource source = new FileDataSource(filename);
        if (filename == null) {

        }

        messageBodyPart.setDataHandler(new DataHandler(source));
        messageBodyPart.setFileName(filename);
        multipart.addBodyPart(messageBodyPart);