KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)ValueHandlerImpl_1_3_1.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 org.omg.CORBA.TCKind JavaDoc;
10
11 /**
12  * This class overrides behavior of our current ValueHandlerImpl to
13  * provide backwards compatibility with JDK 1.3.1.
14  */

15 public class ValueHandlerImpl_1_3_1
16     extends com.sun.corba.se.impl.io.ValueHandlerImpl
17 {
18     public ValueHandlerImpl_1_3_1() {}
19
20     public ValueHandlerImpl_1_3_1(boolean isInputStream) {
21     super(isInputStream);
22     }
23
24     /**
25      * Our JDK 1.3 and JDK 1.3.1 behavior subclasses override this.
26      * The correct behavior is for a Java char to map to a CORBA wchar,
27      * but our older code mapped it to a CORBA char.
28      */

29     protected TCKind JavaDoc getJavaCharTCKind() {
30         return TCKind.tk_char;
31     }
32
33     /**
34      * RepositoryId_1_3_1 performs an incorrect repId calculation
35      * when using serialPersistentFields and one of the fields no longer
36      * exists on the class itself.
37      */

38     public boolean useFullValueDescription(Class JavaDoc clazz, String JavaDoc repositoryID)
39     throws java.io.IOException JavaDoc
40     {
41         return RepositoryId_1_3_1.useFullValueDescription(clazz, repositoryID);
42     }
43     
44     /**
45      * Installs the legacy IIOPOutputStream_1_3_1 which does
46      * PutFields/GetFields incorrectly. Bug 4407244.
47      */

48     protected final String JavaDoc getOutputStreamClassName() {
49         return "com.sun.corba.se.impl.orbutil.IIOPOutputStream_1_3_1";
50     }
51
52     /**
53      * Installs the legacy IIOPInputStream_1_3_1 which does
54      * PutFields/GetFields incorrectly. Bug 4407244.
55      */

56     protected final String JavaDoc getInputStreamClassName() {
57         return "com.sun.corba.se.impl.orbutil.IIOPInputStream_1_3_1";
58     }
59 }
60
Popular Tags