String str = "Your string";
byte[] array = str.getBytes();
More Related Contents:
- Convert a string representation of a hex dump to a byte array using Java?
- how to get the first two bytes from a string in java?
- How to convert a byte array to a hex string in Java?
- In Java, how do I convert a byte array to a string of hex digits while keeping leading zeros? [duplicate]
- Java: Syntax and meaning behind “[B@1ef9157”? Binary/Address?
- What does value & 0xff do in Java?
- Why is the range of bytes -128 to 127 in Java?
- Convert A String (like testing123) To Binary In Java [closed]
- Hexadecimal to Integer in Java
- How are integers cast to bytes in Java?
- How do you specify a byte literal in Java?
- How to convert a byte to its binary string representation
- Java: object to byte[] and byte[] to object converter (for Tokyo Cabinet)
- byte array to short array and back again in java
- Java converting int to hex and back again
- Byte Array to Image object
- Parsing a Hexadecimal String to an Integer throws a NumberFormatException?
- How do I initialize a byte array in Java?
- In Java, how do I convert a hex string to a byte[]? [duplicate]
- How to convert a Byte Array to an Int Array
- Convert binary string to byte array
- Set specific bit in byte
- Convert a String to a byte array and then back to the original String
- Java creating byte array whose size is represented by a long
- 2 bytes to short
- What is the best way to work around the fact that ALL Java bytes are signed?
- Verify if String is hexadecimal
- Java Iterate Bits in Byte Array
- How to convert hex string to float in Java?
- Searching for a sequence of Bytes in a Binary File with Java