Is there a way to check if in BufferedReader
object is something to read? Something like C++ cin.peek()
. Thanks.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You could use a
PushBackReader
to read a character, and then "push it back". That way you know for sure that something was there, without affecting its overall state - a "peek".my solution was.. extending BufferedReader and use queue as buf, then you can use peek method in queue.