org.tranche.meta
Class MetaDataUtil

java.lang.Object
  extended by org.tranche.meta.MetaDataUtil

public class MetaDataUtil
extends java.lang.Object

Utility for working with meta data. objects.

Author:
Jayson Falkner - jfalkner@umich.edu, James "Augie" Hill - augman85@gmail.com

Method Summary
static MetaData read(java.io.InputStream is)
          A helper method to read a serialized MetaData object.
static void write(MetaData md, java.io.OutputStream out)
          Writes a MetaData object to the given OutputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

read

public static final MetaData read(java.io.InputStream is)
                           throws java.lang.Exception

A helper method to read a serialized MetaData object. This does *not* use Java's object serialization mechanism in order to enable versioned support across compiles of code and the ability to use split-files in non-Java programs.

Parameters:
is - The InputStream to read from.
Returns:
The unserialized MetaData object.
Throws:
java.io.IOException - Should any exception occur.
java.lang.Exception

write

public static final void write(MetaData md,
                               java.io.OutputStream out)
                        throws java.lang.Exception

Writes a MetaData object to the given OutputStream. This method does *not* use Java's object serialization mechanism in order to let non-Java code use them.

Parameters:
md - The MetaData object to serialize.
out - The OutputStream to serialize the file to.
Throws:
java.io.IOException - Should any exception occur.
java.lang.Exception


This code is free for use both commercially and non-commercially as stated in the project's license