org.eclipse.core.internal.dtree
Interface IDataFlattener


public interface IDataFlattener

The IElementInfoFlattener interface supports reading and writing element info objects.


Method Summary
 java.lang.Object readData(org.eclipse.core.runtime.IPath path, java.io.DataInput input)
          Reads a data object from the given input stream.
 void writeData(org.eclipse.core.runtime.IPath path, java.lang.Object data, java.io.DataOutput output)
          Writes the given data to the output stream.
 

Method Detail

readData

java.lang.Object readData(org.eclipse.core.runtime.IPath path,
                          java.io.DataInput input)
                          throws java.io.IOException
Reads a data object from the given input stream.

Parameters:
path - the path of the element to be read
input - the stream from which the element info should be read.
Returns:
the object associated with the given path, which may be null.
Throws:
java.io.IOException

writeData

void writeData(org.eclipse.core.runtime.IPath path,
               java.lang.Object data,
               java.io.DataOutput output)
               throws java.io.IOException
Writes the given data to the output stream.

N.B. The bytes written must be sufficient for the purposes of reading the object back in.

Parameters:
path - the element's path in the tree
data - the object associated with the given path, which may be null.
Throws:
java.io.IOException