List of utility methods to do ByteArrayInputStream to String Convert
String | toString(ByteArrayInputStream is) to String int size = is.available(); char[] theChars = new char[size]; byte[] bytes = new byte[size]; is.read(bytes, 0, size); for (int i = 0; i < size;) theChars[i] = (char) (bytes[i++] & 0xff); return new String(theChars); |