Java: Syntax and meaning behind "[B@1ef9157"? Binary/Address? -


Hey, I want to know what is the meaning of the [b @ prefix in java. When I try to print byte arrays, they come out though, the sizes 32 and size 4 byte arrays are the same in length. Always "[b 1234567"]

What is this? In addition, they have the property of printing hex values ​​only. I know that this can not be just a binary print because the random extended esi characters will be visible

Here is an example of a byte [] hashtable mapping print, where mapping is different from a colon, byte , And byte arrays of these 4 byte keys and 32-byte elements.

  [b @ 1f9157: [b @ 1f82982 [b @ 181ed9e: [b @ 16d2633 [b @ 27e353: [b @ e70e30] [b @ cb6009: [b @ 154864a [b @ 18aaa1e [B @ 3c9217 [b @ 20be79: [b @ 9b42e6 [b @ 16925b0: [b] 14520eb [b @ 8ee016: [b @ 1,742,700 [b @ 1bfc93a: [b @ acb158 [b @ 107ebe1: [b @ 1af33d6 [ B @ 156b6b9: [b @ 17431b9 [b @ 139b78e: [b @ 16c79d7] [b2e7820: [b @ b33d0a [b @ 82701e: [b] @ 16c9867 [b @ 1f14ceb: [b @ 89cc5e [b @ da4b71: [ B @ c837cd [b@ ab853b: [b @ c79809] [b @ 765a16: [b @ 1e784b [b @ 1319c: [b @ 3bc473] 

You are looking at object IDs, not a dump of content.

  • [ means array.
  • B means byte.
  • @ separates the type from the ID.
  • hex digits are an object ID or hashound.

    If the intent is to print the contents of the array, there are several ways. For example:

      byte [] = new byte [] {1, 2, 3, -1, -2, -3}; Println (byteArrayToString (in)); String bitratereastring (byte []) {char out [] = new four [in.length * 2]; For (; I & lt; i = 0 int in.length; i ++) {outside [i * 2] = "0123456789ABCDEF" .charAt ((in [i]> 4) & amp; 15); Outside [i * 2 + 1] = "0123456789 ABCDEF" .charAt ([i] and 15); } Return new string (out); }  

    A name can be found in the nomenclature.

    Here is the full list:

    • B
    • C -
    • < Strong>
    • I - int
    • which - long
    • L *** fully qualified category * ; ** - Between a L and between full class name, using the delimiter between the package as / (for example,
    • Li>
      - << strong> [
      strong> (*** logic type * ) *** Return-type * - Method sign, such as (I) V < / Code>, V for zero method with additional code-type

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -