About 10,600,000 results
Open links in new tab
  1. .net - What is a byte [] array? - Stack Overflow

    Jun 28, 2015 · A byte is 8 bits, and an array of byte, is an array of bytes... It really is that simple. The thing to keep in mind is that char and byte are different. In old C style, a char and byte …

  2. c# - byte [] to hex string - Stack Overflow

    Mar 8, 2009 · How do I convert a byte[] to a string? Every time I attempt it, I get System.Byte[] instead of the value. Also, how do I get the value in Hex instead of a decimal?

  3. How do I initialize a byte array in Java? - Stack Overflow

    Jun 26, 2012 · In Java 6, there is a method doing exactly what you want: private static final byte[] CDRIVES = javax.xml.bind.DatatypeConverter.parseHexBinary ...

  4. Is there 'byte' data type in C++? - Stack Overflow

    Aug 28, 2023 · namespace std { // define std::byte enum class byte : unsigned char {}; }; This if your C++ version does not have std::byte will define a byte type in namespace std. Normally …

  5. Convert integer into byte array (Java) - Stack Overflow

    Dec 20, 2009 · This is a perfectly fine answer. Note that big-endian is the specified default, and the methods are "chainable", and the position argument is optional, so it all reduces to: byte[] …

  6. Why is the range of bytes -128 to 127 in Java? - Stack Overflow

    Without getting into two's complement: 2^8 (since a byte is 8 digits and can have 1 of 2 values) = 256, so the most individual values a byte can represent is 256. so, representing the numbers …

  7. math - Converting bytes to megabytes - Stack Overflow

    I've seen three ways of doing conversion from bytes to megabytes: megabytes=bytes/1000000 megabytes=bytes/1024/1024 megabytes=bytes/1024/1000 Ok, I think #3 is totally wrong but I …

  8. java - Byte [] to InputStream or OutputStream - Stack Overflow

    Jan 19, 2010 · so you end up with a byte[]. this could represent any kind of data which may need special types of conversions (character, encrypted, etc). let's pretend you want to write this …

  9. Initialize a byte array to a certain value, other than the default null?

    May 27, 2011 · That way you could call it like byte[] b = new byte[5000].Initialize(0x20); The extension method would be declared as public static byte[] Initialize(this byte[] array, byte …

  10. int - How are integers cast to bytes in Java? - Stack Overflow

    Mar 17, 2010 · Byte is 8 bit. 8 bit can represent 256 numbers.(2 raise to 8=256) Now first bit is used for sign. [if positive then first bit=0, if negative first bit= 1] let's say you want to convert …

Refresh