KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > watson > IElementInfoFlattener


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.watson;
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 IElementInfoFlattener {
21     /**
22      * Reads an element info from the given input stream.
23      * @param elementPath 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 elementPath,
26      * which may be <code>null</code>.
27      */

28     public Object JavaDoc readElement(IPath elementPath, DataInput input) throws IOException;
29
30     /**
31      * Writes the given element 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 elementPath the element's path in the tree
35      * @param element the object associated with the given path,
36      * which may be <code>null</code>.
37      */

38     public void writeElement(IPath elementPath, Object JavaDoc element, DataOutput output) throws IOException;
39 }
40
Popular Tags