KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > ior > EncapsulationFactoryBase


1 /*
2  * @(#)EncapsulationFactoryBase.java 1.7 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.ior ;
9
10 import org.omg.CORBA_2_3.portable.InputStream JavaDoc ;
11
12 import com.sun.corba.se.impl.ior.EncapsulationUtility ;
13
14 public abstract class EncapsulationFactoryBase implements IdentifiableFactory {
15     private int id ;
16
17     public int getId()
18     {
19     return id ;
20     }
21
22     public EncapsulationFactoryBase( int id )
23     {
24     this.id = id ;
25     }
26
27     public final Identifiable create( InputStream JavaDoc in )
28     {
29     InputStream JavaDoc is = EncapsulationUtility.getEncapsulationStream( in ) ;
30     return readContents( is ) ;
31     }
32
33     protected abstract Identifiable readContents( InputStream JavaDoc is ) ;
34 }
35
Popular Tags