com.threerings.io
Class Streamer.OrdEnumStreamer
java.lang.Object
com.threerings.io.Streamer
com.threerings.io.Streamer.EnumStreamer
com.threerings.io.Streamer.OrdEnumStreamer
- Direct Known Subclasses:
- Streamer.ByteOrdEnumStreamer, Streamer.IntOrdEnumStreamer, Streamer.ShortOrdEnumStreamer
- Enclosing class:
- Streamer
protected abstract static class Streamer.OrdEnumStreamer
- extends Streamer.EnumStreamer
Base class for enum streamers that stream by ordinal.
| Nested classes/interfaces inherited from class com.threerings.io.Streamer |
Streamer.ArrayStreamer, Streamer.ByteEnumStreamer, Streamer.ByteOrdEnumStreamer, Streamer.ClassStreamer, Streamer.CustomClassStreamer, Streamer.EnumPolicy, Streamer.EnumStreamer, Streamer.FinalArrayStreamer, Streamer.IntOrdEnumStreamer, Streamer.NameEnumStreamer, Streamer.OrdEnumStreamer, Streamer.ShortOrdEnumStreamer |
|
Field Summary |
protected List<?> |
_universe
The universe of this enum. |
_universe
protected List<?> _universe
- The universe of this enum.
Streamer.OrdEnumStreamer
protected Streamer.OrdEnumStreamer(Class<?> target,
List<?> universe)
- Constructor.
writeObject
public void writeObject(Object object,
ObjectOutputStream out,
boolean useWriter)
throws IOException
- Description copied from class:
Streamer
- Writes the supplied object to the specified stream.
- Specified by:
writeObject in class Streamer
- Parameters:
object - the instance to be written to the stream.out - the stream to which to write the instance.useWriter - whether or not to use the custom writeObject if one exists.
- Throws:
IOException
createObject
public Object createObject(ObjectInputStream in)
throws IOException,
ClassNotFoundException
- Description copied from class:
Streamer
- Creates a blank object that can subsequently be read by this streamer. Data may be read
from the input stream as a result of this method (in the case of arrays, the length of the
array must be read before creating the array).
- Specified by:
createObject in class Streamer
- Throws:
IOException
ClassNotFoundException
writeCode
protected abstract void writeCode(ObjectOutputStream out,
int code)
throws IOException
- Write the ordinal code.
- Throws:
IOException
readCode
protected abstract int readCode(ObjectInputStream in)
throws IOException
- Read the ordinal code.
- Throws:
IOException