如何使用PushbackInputStream来回读取
import java.io.ByteArrayInputStream; /* 来自 *nowjava - 时 代 Java*/ import java.io.IOException; import java.io.PushbackInputStream; public class Main { public static void main(String[] args) { String strExpression = "a = a++ + b;"; byte bytes[] = strExpression.getBytes(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes); PushbackInputStream pis = new PushbackInputStream(bis); int ch; try { while ((ch = pis.read()) != -1) { if (ch == '+') { /** * N o w J a v a . c o m 提 供 **/ if ((ch = pis.read()) == '+') { System.out.print("Plus Plus"); } else { pis.unread(ch); System.out.print("+"); } } else {