Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
4d5ca41b
Commit
4d5ca41b
authored
May 07, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消除成功接收处理
parent
95ec0538
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
StringHelper.java
...c/main/java/com/yanzuoguang/util/helper/StringHelper.java
+6
-3
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/StringHelper.java
View file @
4d5ca41b
...
@@ -746,8 +746,9 @@ public class StringHelper {
...
@@ -746,8 +746,9 @@ public class StringHelper {
StringBuilder
hex
=
new
StringBuilder
(
hash
.
length
*
2
);
StringBuilder
hex
=
new
StringBuilder
(
hash
.
length
*
2
);
for
(
byte
b
:
hash
)
{
for
(
byte
b
:
hash
)
{
if
((
b
&
0xFF
)
<
0x10
)
if
((
b
&
0xFF
)
<
0x10
)
{
hex
.
append
(
"0"
);
hex
.
append
(
"0"
);
}
hex
.
append
(
Integer
.
toHexString
(
b
&
0xFF
));
hex
.
append
(
Integer
.
toHexString
(
b
&
0xFF
));
}
}
return
hex
.
toString
();
return
hex
.
toString
();
...
@@ -773,10 +774,12 @@ public class StringHelper {
...
@@ -773,10 +774,12 @@ public class StringHelper {
StringBuilder
buf
=
new
StringBuilder
();
StringBuilder
buf
=
new
StringBuilder
();
for
(
int
offset
=
0
;
offset
<
b
.
length
;
offset
++)
{
for
(
int
offset
=
0
;
offset
<
b
.
length
;
offset
++)
{
i
=
b
[
offset
];
i
=
b
[
offset
];
if
(
i
<
0
)
if
(
i
<
0
)
{
i
+=
256
;
i
+=
256
;
if
(
i
<
16
)
}
if
(
i
<
16
)
{
buf
.
append
(
"0"
);
buf
.
append
(
"0"
);
}
buf
.
append
(
Integer
.
toHexString
(
i
));
buf
.
append
(
Integer
.
toHexString
(
i
));
}
}
to
=
buf
.
toString
();
to
=
buf
.
toString
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment