try
{
char c;
DataInputStream Is = new DataInputStream(new StringBufferInputStream(s2));
System.out.println("Formatted read data");
while((c=(char)Is.readByte())!=-1)
System.out.print(c);

Is.close();
}
catch(EOFException e)
{
System.out.println("end of String");
}提示方法过时了
new StringBufferInputStream(s2);
要如何作才能得到正确的解答.
这里要用到字符串流,并且可以以读入特殊类型数据的方法
读入数据.