Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.iiop.rmi.marshal
Class CDRStream

    java.lang.Object
      org.jboss.iiop.rmi.marshal.CDRStream

public class CDRStream
extends Object

Utility class with static methods to:

- get the `CDRStreamReader` for a given class
- get the `CDRStreamWriter` for a given class

The `CDRStreamReader`s and `CDRStreamWriter`s returned by these methods are instances of static inner classes defined by `CDRStream`.

Version:
  $Revision: 1.10 $
Author:
  Francisco Reverbel

Constructor Summary
`CDRStream()`

Method Summary
`static String` | `abbrevFor(Class clz)` Returns the abbreviated name of the marshaller for given `Class`.
`static CDRStreamReader` | `readerFor(Class clz)` Returns the `CDRStreamReader` for a given `Class`.
`static CDRStreamReader` | `readerFor(String s, ClassLoader cl)` Returns a `CDRStreamReader` given an abbreviated name and a `ClassLoader` for valuetype classes.
`static CDRStreamWriter` | `writerFor(Class clz)` Returns the `CDRStreamWriter` for a given `Class`.
`static CDRStreamWriter` | `writerFor(String s, ClassLoader cl)` Returns a `CDRStreamWriter` given an abbreviated name and a `ClassLoader` for valuetype classes.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CDRStream

    public CDRStream()

Method Detail

### abbrevFor

    public static String abbrevFor(Class clz)

  Returns the abbreviated name of the marshaller for given `Class`.

  Abbreviated names of marshallers for basic types follow the usual Java convention:

          type           abbrev name
          boolean           "Z"
          byte              "B"
          char              "C"
          double            "D"
          float             "F"
          int               "I"
          long              "J"
          short             "S"
          void              "V"

  The abbreviated names of marshallers for object types are:

          java.lang.String                     "G" (strinG)
          RMI remote interface                 "R" + interfaceName
          RMI abstract interface               "A"
          serializable                         "E" (sErializablE)
          valuetype                            "L" + className
          externalizable                       "X" (eXternalizable)
          org.omg.CORBA.Object                 "M" (oMg)
          IDL interface                        "N" + interfaceName
          java.lang.Object                     "O"

  As an example: the abbreviated name of a marshaller for a valuetype class named `Foo` is the string `"LFoo"`.

### readerFor

    public static CDRStreamReader readerFor(String s,
                                            ClassLoader cl)

  Returns a `CDRStreamReader` given an abbreviated name and a `ClassLoader` for valuetype classes.

### writerFor

    public static CDRStreamWriter writerFor(String s,
                                            ClassLoader cl)

  Returns a `CDRStreamWriter` given an abbreviated name and a `ClassLoader` for valuetype classes.

### readerFor

    public static CDRStreamReader readerFor(Class clz)

  Returns the `CDRStreamReader` for a given `Class`.

### writerFor

    public static CDRStreamWriter writerFor(Class clz)

  Returns the `CDRStreamWriter` for a given `Class`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.