1 7 8 package com.sun.corba.se.spi.servicecontext; 9 10 import org.omg.CORBA.SystemException ; 11 import org.omg.CORBA_2_3.portable.InputStream ; 12 import org.omg.CORBA_2_3.portable.OutputStream ; 13 import com.sun.corba.se.spi.ior.iiop.GIOPVersion; 14 import com.sun.corba.se.spi.servicecontext.ServiceContext ; 15 16 public class UnknownServiceContext extends ServiceContext { 17 public UnknownServiceContext( int id, byte[] data ) 18 { 19 this.id = id ; 20 this.data = data ; 21 } 22 23 public UnknownServiceContext( int id, InputStream is ) 24 { 25 this.id = id ; 26 27 int len = is.read_long(); 28 data = new byte[len]; 29 is.read_octet_array(data,0,len); 30 } 31 32 public int getId() { return id ; } 33 34 public void writeData( OutputStream os ) throws SystemException 35 { 36 } 37 38 public void write( OutputStream os , GIOPVersion gv) 39 throws SystemException 40 { 41 os.write_long( id ) ; 42 os.write_long( data.length ) ; 43 os.write_octet_array( data, 0, data.length ) ; 44 } 45 46 public byte[] getData() 47 { 48 return data ; 49 } 50 51 private int id = -1 ; 52 private byte[] data = null ; 53 } 54 55 | Popular Tags |