import java.io *;. class ByteArrayInputStreamDemo {public static void main (String [] args) {String strTmp = "ShengJiahui"; byte b [] = strTmp.getBytes (); ByteArrayInputStream in = new ByteArrayInputStream (b);
For (int i = 0; i <2; i ) {INT C; while ((c = in.read ())! = - 1) {if (i == 0) {system.out.print ((charr) );} else {system.out.print (character.touppercase ((char) c));}} system.out.println (); in.Reset ();}}}