Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Hook up an ObjectOutputStream to a corresponding ObjectInputStream

  1. May 26, 2006 #1


    User Avatar
    Science Advisor

    In Java, I want to hook up an ObjectOutputStream to a corresponding ObjectInputStream without a socket in between. My motivation is that I'm going to have a bunch of objects with neigbhors, but the objects will be hooked up to their neighbors by a separate method (the objects should not need to have a priori knowledge of how they are hooked up). How can I do this?

    I could just have each object store references to its neighbors, and have functions to interact directly with the neighbors, but I'd prefer the abstraction of a stream if it's possible.

    Edit: never mind, I figured it out (PipedOutputStreams).
    Last edited: May 26, 2006
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted