站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

NbMarshalledObject (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.util.io
Class NbMarshalledObject

java.lang.Object
  extended byorg.openide.util.io.NbMarshalledObject
All Implemented Interfaces:
Serializable

public final class NbMarshalledObject
extends Object
implements Serializable

Object that holds serialized reference to another object. Inspirated by java.rmi.MarshalledObject but modified to work with NetBeans and its modules. So no annotations are stored with the bytestream and when the object is deserialized it is assumed to be produced by the core IDE or one of installed modules or it is located in the repository.

See Also:
Serialized Form

Constructor Summary
NbMarshalledObject(Object obj)
          Creates a new NbMarshalledObject that contains the serialized representation of the provided object.
 
Method Summary
 boolean equals(Object obj)
          Two objects are equal if the hold the same serialized representation.
 Object get()
          Returns a new copy of the contained marshalledobject.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NbMarshalledObject

public NbMarshalledObject(Object obj)
                   throws IOException
Creates a new NbMarshalledObject that contains the serialized representation of the provided object.

Parameters:
obj - the object to be serialized (must be serializable)
Throws:
IOException - the object is not serializable
Method Detail

get

public Object get()
           throws IOException,
                  ClassNotFoundException
Returns a new copy of the contained marshalledobject. The object is deserialized by NbObjectInputStream, so it is assumed that it can be located by core IDE, a module or in the repository.

Returns:
a copy of the contained object
Throws:
IOException - on any I/O problem
ClassNotFoundException - if the class of the object cannot be found

hashCode

public int hashCode()
Returns:
a hash code

equals

public boolean equals(Object obj)
Two objects are equal if the hold the same serialized representation.

Parameters:
obj - the object to compare with this MarshalledObject
Returns:
true if the objects are serialized into the same bytestreams


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.