No. Although you could use the ObjectInputStream
in another thread and check to see whether that has an object available. Generally polling isn’t a great idea, particularly with the poor guarantees of InputStream.available
.
More Related Contents:
- Gson: How to exclude specific fields from Serialization without annotations
- Avoid Jackson serialization on non fetched lazy objects
- Why Java needs Serializable interface?
- Are there C++ equivalents for the Protocol Buffers delimited I/O functions in Java?
- When and why JPA entities should implement the Serializable interface?
- XML serialization in Java? [closed]
- Java socket/serialization, object won’t update
- Converting any object to a byte array in java
- Why when a constructor is annotated with @JsonCreator, its arguments must be annotated with @JsonProperty?
- Gson custom seralizer for one variable (of many) in an object using TypeAdapter
- Why generate long serialVersionUID instead of a simple 1L?
- What is the best way to convert a java object to xml with open source apis [closed]
- Writing Custom Kafka Serializer
- Is it ok to save a JSON array in SharedPreferences?
- GSON – Custom serializer in specific case
- GSON deserializing key-value to custom object
- Serializing and De-Serializing android.graphics.Bitmap in Java
- Make Java runtime ignore serialVersionUIDs?
- Managing several versions of serialized Java objects
- How to serialize Java primitives using Jersey REST
- Serialize JavaFX components
- Use class name as root key for JSON Jackson serialization
- How do I use Google’s Gson API to deserialize JSON properly?
- java.io.InvalidClassException: local class incompatible:
- Does it matter what I choose for serialVersionUID when extending Serializable classes in Java?
- How does Java’s serialization work and when it should be used instead of some other persistence technique?
- Custom Jackson Serializer for a specific type in a particular class
- Java serialization: readObject() vs. readResolve()
- Why use the `transient` keyword in java? [duplicate]
- Jackson custom annotation for custom value serialization