KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > dtree > IDataFlattener


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.dtree;
12
13 import java.io.*;
14 import org.eclipse.core.runtime.IPath;
15
16 /**
17  * The <code>IElementInfoFlattener</code> interface supports
18  * reading and writing element info objects.
19  */

20 public interface IDataFlattener {
21     /**
22      * Reads a data object from the given input stream.
23      * @param path the path of the element to be read
24      * @param input the stream from which the element info should be read.
25      * @return the object associated with the given path,
26      * which may be <code>null</code>.
27      */

28     public Object JavaDoc readData(IPath path, DataInput input) throws IOException;
29
30     /**
31      * Writes the given data to the output stream.
32      * <p> N.B. The bytes written must be sufficient for the
33      * purposes of reading the object back in.
34      * @param path the element's path in the tree
35      * @param data the object associated with the given path,
36      * which may be <code>null</code>.
37      */

38     public void writeData(IPath path, Object JavaDoc data, DataOutput output) throws IOException;
39 }
40
Popular Tags