Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
i4refit
framework
Commits
b2af5376
Commit
b2af5376
authored
3 years ago
by
Michael Eischer
Browse files
Options
Downloads
Patches
Plain Diff
debug helper function
parent
b5560947
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/refit/util/REFITPayload.java
+11
-0
11 additions, 0 deletions
src/refit/util/REFITPayload.java
with
11 additions
and
0 deletions
src/refit/util/REFITPayload.java
+
11
−
0
View file @
b2af5376
...
...
@@ -3,6 +3,7 @@ package refit.util;
import
java.nio.ByteBuffer
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.Arrays
;
public
class
REFITPayload
{
...
...
@@ -56,4 +57,14 @@ public class REFITPayload {
return
s
.
toString
();
}
// helper function for "evaluate expression" in the debugger
public
static
String
bbToString
(
ByteBuffer
bb
)
{
int
pos
=
bb
.
position
();
byte
[]
bytes
=
new
byte
[
bb
.
remaining
()];
bb
.
get
(
bytes
);
bb
.
position
(
pos
);
// return string as that way simplifies copying the full content of a message in intellij
return
Arrays
.
toString
(
bytes
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment