- //先以BASE64Encoder对页面大文本进行编码,存入数据库,字段设置文本字段
- String textEncode=new sun.misc.BASE64Encoder().encode(object.getText().getBytes());
- //对数据库读出数据以BASE64Decoder解码
- String textDecoder;
- try {
- textDecoder = new String(new sun.misc.BASE64Decoder().decodeBuffer(object.getText()));
- } catch (IOException e) {
- e.printStackTrace();
- }