com.threerings.export
Class Streamer<T>

java.lang.Object
  extended by com.threerings.export.Streamer<T>

public abstract class Streamer<T>
extends Object

Writes objects to and reads objects from a binary stream.


Constructor Summary
Streamer()
           
 
Method Summary
static Streamer getStreamer(Class<?> clazz)
          Returns the streamer, if any, for the specified class.
abstract  T read(DataInputStream in)
          Reads an object from the stream.
abstract  void write(T value, DataOutputStream out)
          Writes an object to the stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Streamer

public Streamer()
Method Detail

getStreamer

public static Streamer getStreamer(Class<?> clazz)
Returns the streamer, if any, for the specified class.


write

public abstract void write(T value,
                           DataOutputStream out)
                    throws IOException
Writes an object to the stream.

Throws:
IOException

read

public abstract T read(DataInputStream in)
                throws IOException,
                       ClassNotFoundException
Reads an object from the stream.

Throws:
IOException
ClassNotFoundException


Copyright © 2011. All Rights Reserved.