使用Base64恩codeR为en code包含原始字符的字符串 [英] Using BASE64 Encoder to encode a string containing raw characters

查看:127
本文介绍了使用Base64恩codeR为en code包含原始字符的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我要发送的字符串包含正因为如此,在服务器中唯一的串高达被收到。我应该如何使用BASE64En codeR在客户端连接到code字符串。请记住,我有一个包含的字符串。而如何去code将其在服务器?结果

The string that I want to send contains # because of this, in the server only the string upto # is recieved. How should I use BASE64Encoder in the client side to encode the String. PLease remember that I have a string which contains the #. And how to decode it in the server?

推荐答案

使用 URLEn codeR URLDe codeR 类用于此目的。

String urlParam = URLEncoder.encode(param);

...

String param = URLDecoder.decode(urlParam);

这篇关于使用Base64恩codeR为en code包含原始字符的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆