Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7941925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:48:49+00:00 2026-06-03T23:48:49+00:00

How can I reliably get the 64bit data from an XML file to a

  • 0

How can I reliably get the 64bit data from an XML file to a byte[] and then compare that with a string? The following code fails as it seems the whitespace is causing the assert to fail. The goal is for the assert to pass.

Note that it is important that we have it in the form of byte[] at somepoint, but not that the comparison be via strings

<Contents>VGVzdGluZyBURSBzZXNzaW9uIGNvbnRhaW5pbmcgQ29tcGxldGUgUGVyc29uIEEgYW5kIENvbXBs
                ZXRlIEVxdWlwbWVudCBCLg0KDQpUZXN0IFRlc3QNCg0KUmVmZXJlbmNlcyBDb21wbGV0ZSBQbGFj
                ZSBB
            </Contents>

byte[] byteData = document.Contents.text()
assert 'VGVzdGluZyBURSBzZXNzaW9uIGNvbnRhaW5pbmcgQ29tcGxldGUgUGVyc29uIEEgYW5kIENvbXBs'+
                'ZXRlIEVxdWlwbWVudCBCLg0KDQpUZXN0IFRlc3QNCg0KUmVmZXJlbmNlcyBDb21wbGV0ZSBQbGFj'+
                'ZSBB' == new String(byteData)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:48:52+00:00Added an answer on June 3, 2026 at 11:48 pm

    Base 64 data is a special encoding of text to ASCII to be URL friendly (historically)

    EDIT thanks to comment below, actually base64 was to encode data to send via for email

    to extract text from your data, do this:

    new String(
    'VGVzdGluZyBURSBzZXNzaW9uIGNvbnRhaW5pbmcgQ29tcGxldGUgUGVyc29uIEEgYW5kIENvbXBsZXRlIEVxdWlwbWVudCBCLg0KDQpUZXN0IFRlc3QNCg0KUmVmZXJlbmNlcyBDb21wbGV0ZSBQbGFjZSBB')
    .decodeBase64()
    )
    

    result starts with ‘ession containing Complete Person A and Complete Equipment B.’

    from http://mrhaki.blogspot.fr/2009/11/groovy-goodness-base64-encoding.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is basic stuff but I can't get this following form to process reliably.
I'd like to write a function that works reliably to get the string literal
How can I get the source code for Arjuna/JBossTM that matches my JBoss version?
How can you reliably and dynamically load a JavaScript file? This will can be
Does anyone have an example of script that can work reliably well across IE/Firefox
I have my users DOB as a string (don't ask), how can I reliably
I have android.permission.READ_OWNER_DATA but I can't find any reliable code that would explain how
I use this code to get the available IPv4 addresses: static void Main(string[] args)
I have a singleton logger that contains a vector. Objects from outside can append
Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.