Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要执行反序列化,我需要一个ObjectInputStream. 但是我们只使用AsynchronousSocketChannel,它不能转换为ObjectInputStream。我能做些什么?
ObjectInputStream
AsynchronousSocketChannel
您可以转换AsynchronousSocketChannel为InputStreamby Channels.newInputStream(channel)。
InputStream
Channels.newInputStream(channel)