A DESCRIPTION OF THE REQUEST :
Because Sun Microsystems deprecated the following methods (of the java.lang.String class):
1. String(byte ascii, int hibyte)
2. String(byte ascii, int hibyte, int offset, int count)
3. void getBytes(int srcBegin, int srcEnd, byte dst, int dstBegin)
it is inconvenient to use the java.lang.String class to store binary data, though this is often a useful thing to do.
Using java.lang.String is useful because unlike with byte, one can use methods such as indexOf, to search through data.
EXPECTED VERSUS ACTUAL BEHAVIOR :
Methods specified above should not be deprecated or some other means of allowing binary data in java.lang.String (i.e. with a new Charset called "BINARY")
Instead, to read binary data into a java.lang.String, one must use a loop (or the deprecated methods). Writing binary data is ok (using ok in the "not entirely pleasing" sense, because the DataOutputStream.writeBytes (String) handles this fairly well, at least for writing to output streams).
CUSTOMER SUBMITTED WORKAROUND :
String readString = new String (input, 0);