KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > orbutil > IIOPOutputStream_1_3


1 /*
2  * @(#)IIOPOutputStream_1_3.java 1.6 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 package com.sun.corba.se.impl.orbutil;
8
9 import java.io.*;
10
11 /**
12  * Implements legacy behavior from before Ladybird to maintain
13  * backwards compatibility.
14  */

15 public class IIOPOutputStream_1_3 extends com.sun.corba.se.impl.io.IIOPOutputStream
16 {
17     // We can't assume that the superclass's putFields
18
// member will be non-private. We must allow
19
// the RI to run on JDK 1.3.1 FCS as well as
20
// the JDK 1.3.1_01 patch.
21
private ObjectOutputStream.PutField putFields_1_3;
22
23     // The newer version in the io package correctly writes a wstring instead.
24
// This concerns bug 4379597.
25
protected void internalWriteUTF(org.omg.CORBA.portable.OutputStream JavaDoc stream,
26                                     String JavaDoc data)
27     {
28         stream.write_string(data);
29     }
30
31     public IIOPOutputStream_1_3()
32     throws java.io.IOException JavaDoc {
33     super();
34     }
35
36     /**
37      * Before JDK 1.3.1_01, the PutField/GetField implementation
38      * actually sent a Hashtable.
39      */

40     public ObjectOutputStream.PutField putFields()
41     throws IOException {
42     putFields_1_3 = new LegacyHookPutFields();
43     return putFields_1_3;
44     }
45
46     public void writeFields()
47     throws IOException {
48     putFields_1_3.write(this);
49     }
50 }
51
Popular Tags