public class CodeSet extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CodeSet.InputBuffer
This interface represents a buffer from which character data can be read.
|
static interface |
CodeSet.OutputBuffer
Represents a buffer to which character data may be written.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
csName(int cs)
Convert the CORBA standard id to a String name.
|
int |
get_wstring_size(String string,
int startPos,
int currentPos)
Returns the length of the string just written to the buffer.
|
static CodeSet |
getCodeSet(int id)
Returns the code set which matches the specified ID.
|
static CodeSet |
getCodeSet(String name)
Returns the code set which matches the specified name, which should either be the canonical name of
a supported encoding or the hex representation of its ID.
|
static CodeSet |
getCodeSetIfMatched(int localCodeSetId,
org.omg.CONV_FRAME.CodeSetComponent remote) |
int |
getId()
Returns the CORBA-standard id for this code set.
|
static CodeSet |
getMatchingCodeSet(org.omg.CONV_FRAME.CodeSetComponent local,
org.omg.CONV_FRAME.CodeSetComponent remote,
boolean wide) |
String |
getName()
Returns the canonical name of this code set.
|
static CodeSet |
getNegotiatedCodeSet(ORB orb,
org.omg.CONV_FRAME.CodeSetComponentInfo serverCodeSetInfo,
boolean wide) |
char |
read_wchar(CodeSet.InputBuffer buffer,
int giop_minor,
boolean littleEndian)
Reads a wide character from the specified buffer.
|
String |
read_wstring(CodeSet.InputBuffer buffer,
int lengthIndicator,
int giop_minor,
boolean littleEndian)
Reads a wide string from the buffer.
|
boolean |
supportsCharacterData(boolean wide)
Returns true if this codeset supports the specified character type.
|
boolean |
supportsWideCharacterData()
Returns true if this codeset supports multie-byte characters
|
String |
toString() |
boolean |
write_bom(boolean configuredForBom)
Returns true if this code set requires byte-order-markers to be written to the beginning of a stream of text.
|
void |
write_char(CodeSet.OutputBuffer buffer,
char c,
boolean write_bom,
boolean write_length,
int giop_minor)
Writes a character to the buffer with the appropriate encoding.
|
void |
write_string(CodeSet.OutputBuffer buffer,
String s,
boolean write_bom,
boolean write_length,
int giop_minor)
Writes a sting to the buffer with the appropriate encoding.
|
public CodeSet(int id,
String name)
public static String csName(int cs)
cs - public static CodeSet getCodeSet(String name)
name - the string used to select a codeset.public static CodeSet getCodeSet(int id)
public static CodeSet getNegotiatedCodeSet(ORB orb, org.omg.CONV_FRAME.CodeSetComponentInfo serverCodeSetInfo, boolean wide)
public static CodeSet getMatchingCodeSet(org.omg.CONV_FRAME.CodeSetComponent local, org.omg.CONV_FRAME.CodeSetComponent remote, boolean wide)
public static CodeSet getCodeSetIfMatched(int localCodeSetId, org.omg.CONV_FRAME.CodeSetComponent remote)
public boolean supportsCharacterData(boolean wide)
wide - public boolean supportsWideCharacterData()
public int getId()
public String getName()
public boolean write_bom(boolean configuredForBom)
configuredForBom - true if the orb has been configured to write byte-order-markers.public char read_wchar(CodeSet.InputBuffer buffer, int giop_minor, boolean littleEndian)
buffer - the buffer containing the data.giop_minor - the low-order byte of the giop version (1.x is assumed)littleEndian - true if the character is to be read low end firstpublic String read_wstring(CodeSet.InputBuffer buffer, int lengthIndicator, int giop_minor, boolean littleEndian)
buffer - the buffer from which to read the stringlengthIndicator - the length indicator already readgiop_minor - the low-order byte of the giop version (1.x is assumed)littleEndian - true if the characters are to be read low end firstpublic void write_char(CodeSet.OutputBuffer buffer, char c, boolean write_bom, boolean write_length, int giop_minor)
buffer - the buffer to which the character is writtenc - the character to writewrite_bom - true if a byte-order-marker (indicating big-endian) should be writtenwrite_length - true if the length of the character should be writtengiop_minor - the low-order byte of the giop version (1.x is assumed)public void write_string(CodeSet.OutputBuffer buffer, String s, boolean write_bom, boolean write_length, int giop_minor)
buffer - the buffer to which the string is writtens - the string to writewrite_bom - true if a byte-order-marker (indicating big-endian) should be writtenwrite_length - true if the length of the character should be writtengiop_minor - the low-order byte of the giop version (1.x is assumed)public int get_wstring_size(String string, int startPos, int currentPos)
string - the string writtenstartPos - the starting position at which the string was writtencurrentPos - the current buffer positionCopyright © 2017 JacORB. All rights reserved.