, , , , BLOB.
: . . 0 1.
: , ( , ). .
: , , 0 1.
BLOB: , . , , .
: - , .
, .
import java.nio.ByteBuffer;
public class TestByteAndBinary{
public static void main(String []args){
String s = "test";
System.out.println(s);
System.out.println();
byte[] bytes = s.getBytes();
for(byte b : bytes){
System.out.println(b);
}
System.out.println();
for(byte b : bytes){
String c = String.format("%8s", Integer.toBinaryString(b)).replace(' ', '0');
System.out.println(c);
}
}
}
:
$javac TestByteAndBinary.java
$java -Xmx128M -Xms16M TestByteAndBinary
test
116
101
115
116
01110100
01100101
01110011
01110100
: , BLOB.
! .
.
, . , , . , .