com.threerings.export
Interface Encodable

All Superinterfaces:
Exportable
All Known Implementing Classes:
Color4f, Coord, Matrix3f, Matrix4f, Plane, Quaternion, SphereCoords, Vector2f, Vector3f, Vector4f

public interface Encodable
extends Exportable

An interface for objects that can be encoded to and decoded from strings and binary streams.


Method Summary
 void decodeFromStream(DataInputStream in)
          Initializes this object with data read from the specified stream.
 void decodeFromString(String string)
          Initializes this object with the contents of the specified string.
 void encodeToStream(DataOutputStream out)
          Encodes this object to the specified stream.
 String encodeToString()
          Returns a string representation of this object.
 

Method Detail

encodeToString

String encodeToString()
Returns a string representation of this object.


decodeFromString

void decodeFromString(String string)
                      throws Exception
Initializes this object with the contents of the specified string.

Throws:
Exception

encodeToStream

void encodeToStream(DataOutputStream out)
                    throws IOException
Encodes this object to the specified stream.

Throws:
IOException

decodeFromStream

void decodeFromStream(DataInputStream in)
                      throws IOException
Initializes this object with data read from the specified stream.

Throws:
IOException


Copyright © 2011. All Rights Reserved.