org.jinterop.dcom.core
Class JIString

java.lang.Object
  extended by org.jinterop.dcom.core.JIString
All Implemented Interfaces:
java.io.Serializable

public final class JIString
extends java.lang.Object
implements java.io.Serializable

Class representing a String. The Wide Char (LPWSTR) and the BSTRs are both encoded by the server in "UTF-16LE". This encoding will be preserved by the library for all to and fro operations.

Since:
1.0
See Also:
Serialized Form

Field Summary
 JIVariant Variant
          Represents JIVariant for this JIString, it is valid only if the JIString is a BSTR(JIFlags.FLAG_REPRESENTATION_STRING_BSTR) type.
 JIVariant VariantByRef
          Represents JIVariant(byRef = true) for this JIString, it is valid only if the JIString is a BSTR(JIFlags.FLAG_REPRESENTATION_STRING_BSTR) type.
 
Constructor Summary
JIString(int type)
          Creates a JIString Object of the specified type.
JIString(java.lang.String str)
          Creates a JIString Object of the BSTR type.
JIString(java.lang.String str, int type)
          Creates a JIString Object.
 
Method Summary
 java.lang.String getString()
          String encapsulated by this Object.
 int getType()
          Type representing the String
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Variant

public final JIVariant Variant
Represents JIVariant for this JIString, it is valid only if the JIString is a BSTR(JIFlags.FLAG_REPRESENTATION_STRING_BSTR) type.


VariantByRef

public final JIVariant VariantByRef
Represents JIVariant(byRef = true) for this JIString, it is valid only if the JIString is a BSTR(JIFlags.FLAG_REPRESENTATION_STRING_BSTR) type.

Constructor Detail

JIString

public JIString(int type)
Creates a JIString Object of the specified type. To be used while deserialiazing this Object.

Parameters:
type - JIFlags , String flags only.

JIString

public JIString(java.lang.String str,
                int type)
Creates a JIString Object. To be used while serialiazing this Object.

Parameters:
str -
type - JIFlags , String flags only.

JIString

public JIString(java.lang.String str)
Creates a JIString Object of the BSTR type. To be used while serialiazing this Object.

Parameters:
str -
Method Detail

getString

public java.lang.String getString()
String encapsulated by this Object. The encoding scheme for LPWSTR and BSTR strings is "UTF-16LE".

Returns:

getType

public int getType()
Type representing the String

Returns:
JIFlag's String types.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object