# Can't get hex bytes from file

**URL:** https://discourse.processing.org/t/cant-get-hex-bytes-from-file/2752
**Category:** Coding Questions
**Created:** [August 18, 2018, 1:47pm UTC](https://discourse.processing.org/t/cant-get-hex-bytes-from-file/2752 "2018-08-18T13:47:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Odermonicon](https://avatars.discourse-cdn.com/v4/letter/o/96bed5/32.png) [@Odermonicon](https://discourse.processing.org/u/Odermonicon)
#### Post date: [August 18, 2018, 1:47pm UTC](https://discourse.processing.org/t/cant-get-hex-bytes-from-file/2752/1 "2018-08-18T13:47:06Z")

</div>

I am trying to make a 6502 disassembler and found out that saveBytes() and loadBytes() do not save and load hex bytes, I tried to extract a text file containing the letter “a” expecting to get “61” but got “[B@1c0f834d”, help! Code: byte b[] = loadBytes(“test.txt”);  
print(b);

---

<div class="post-metadata">

### Author: ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)
#### Post date: [August 18, 2018, 7:12pm UTC](https://discourse.processing.org/t/cant-get-hex-bytes-from-file/2752/2 "2018-08-18T19:12:06Z")

</div>

`print(b);` is giving you weird output because b is an array of bytes.

You want to show the value of a specific byte! Not the array of them!

Try `print(b[0]);` instead. This will give you the numerical value of the first byte in the array.

---

<div class="post-metadata">

### Author: ![Odermonicon](https://avatars.discourse-cdn.com/v4/letter/o/96bed5/32.png) [@Odermonicon](https://discourse.processing.org/u/Odermonicon)
#### Post date: [August 19, 2018, 2:54pm UTC](https://discourse.processing.org/t/cant-get-hex-bytes-from-file/2752/3 "2018-08-19T14:54:04Z")

</div>

~~That ended up giving me “97” not “61”~~  
EDIT “97” in hex is “61” so it does work, thanks!
