I have an ObjectInputStream which needs to read two different inputs which are a String and my own created object. I have a thread which constantly waits for an input and depending on the input be it a string or object it will process the result. I need a way for the input to be able to distinguish between the two.
Any help would be great.
Thanks