FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaExercises/Experiments/FileNameDecode.java at master · biblelamp/JavaExercises · GitHub
biblelamp
/
JavaExercises
Public
Notifications
You must be signed in to change notification settings
Fork
130
Star
153
Code
Issues
1
Pull requests
9
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaExercises
/
Experiments
/
FileNameDecode.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
16 lines (12 loc) · 545 Bytes
Breadcrumbs
JavaExercises
/
Experiments
/
FileNameDecode.java
Copy path
File metadata and controls
16 lines (12 loc) · 545 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class
FileNameDecode
{
// after (in Angular):
// btoa(encodeURI(file.name))
public
static
void
main
(
String
[]
args
)
throws
java
.
io
.
UnsupportedEncodingException
{
String
encodeURI
=
"Ahoj%20jak%20se%20m%C3%A1%C5%A1"
;
String
btoa
=
"QWhvaiUyMGphayUyMHNlJTIwbSVDMyVBMSVDNSVBMQ=="
;
System
.
out
.
println
(
java
.
net
.
URLDecoder
.
decode
(
encodeURI
,
"UTF-8"
));
System
.
out
.
println
(
java
.
net
.
URLDecoder
.
decode
(
new
String
(
java
.
util
.
Base64
.
getDecoder
().
decode
(
btoa
)),
"UTF-8"
));
}
}
Back
|
FazBrowse Home
|
New Git URL