把你读的encode一下不就完事了吗

解决方案 »

  1.   

    public static String getWord(String filePath) {
            String result = null;
            File file = new File(filePath);
            try {
                FileInputStream fis = new FileInputStream(file);
                WordExtractor wordExtractor = new WordExtractor(fis);
                result = wordExtractor.getText();
    /*base64加密*/
                System.out.println(new BASE64Encoder()).encodeBuffer(result));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
            ;
            return result;
        }
      

  2.   

    /*base64解密*/
    System.out.println(new BASE64Decoder()).decodeBuffer(result));
      

  3.   

    大神,我顺便问下,怎么读取图片放入xml里?不是读取图片url,那我该读取图片的什么呢?而且读取后的也要base64加密。
      

  4.   

    大神,我顺便问下,怎么读取图片放入xml里?不是读取图片url,那我该读取图片的什么呢?而且读取后的也要base64加密。
    没处理过图片,你可以将图片以二进制流的方式放到xml,在解析这段xml。
    用到java FileStream类,具体怎么用你上网查下
      

  5.   

    流就相当于一段文本,你将这段文本base64加密就行