FileDocCategorySizeDatePackage
GenericIdentifiable.javaAPI DocJava SE 5 API1719Fri Aug 26 14:54:22 BST 2005com.sun.corba.se.impl.ior

GenericIdentifiable

public abstract class GenericIdentifiable extends Object implements Identifiable
author
This is used for unknown components and profiles. A TAG_MULTICOMPONENT_PROFILE will be represented this way.

Fields Summary
private int
id
private byte[]
data
Constructors Summary
public GenericIdentifiable(int id, InputStream is)

	this.id = id ;
	data = EncapsulationUtility.readOctets( is ) ;
    
public GenericIdentifiable(int id, byte[] data)

	this.id = id ;
	this.data = (byte[])(data.clone()) ;
    
Methods Summary
public booleanequals(java.lang.Object obj)

	if (obj == null)
	    return false ;

	if (!(obj instanceof GenericIdentifiable))
	    return false ;

	GenericIdentifiable encaps = (GenericIdentifiable)obj ;

	return (getId() == encaps.getId()) && 
	    Arrays.equals( getData(), encaps.getData() ) ;
    
public byte[]getData()

	return data ;
    
public intgetId()

	return id ;
    
public inthashCode()

	int result = 17 ;
	for (int ctr=0; ctr<data.length; ctr++ )
	    result = 37*result + data[ctr] ;
	return result ;
    
public java.lang.StringtoString()

	return "GenericIdentifiable[id=" + getId() + "]" ;
    
public voidwrite(org.omg.CORBA_2_3.portable.OutputStream os)

	os.write_ulong( data.length ) ;
	os.write_octet_array( data, 0, data.length ) ;