package StreamDemo;
import java.io.*;
public class PushbackInputStream {
public static void main(String []args)throws IOException
{
  String a="if (a == 4) a=0;\n";
  byte b[]=a.getBytes();
  ByteArrayInputStream one=new ByteArrayInputStream(b);
 
  PushbackInputStream two=new PushbackInputStream(one);
  int c;
  while((c=two.read()!=-1))
  {
  switch(c)
  {
  case '=':
  if((c=two.read())!='=')
  {
 System.out.print(".eq.");
  }
  else
  {
  System.out.print("<-");
  two.unread(c);
  }
  break;
  default:
  System.out.print(c);
  break;
  }
  }
  
  
}
}
为什么one不能做参数PushbackInputStream two=new PushbackInputStream(one);