public final class ORBUtility extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
bytesToInt(byte[] array,
int offset)
Unmarshal a byte array to an integer.
|
static byte |
chooseEncodingVersion(ORB orb,
IOR ior,
GIOPVersion gv) |
static String |
classNameOf(String repositoryId)
Get the class name corresponding to a particular repository Id.
|
static int |
compareVersion(int[] v1,
int[] v2)
Compare two version arrays.
|
static int |
compareVersion(String v1,
String v2)
Compare two version strings.
|
static String[] |
concatenateStringArrays(String[] arr1,
String[] arr2) |
static ValueHandler |
createValueHandler()
Gets the ValueHandler from Util.createValueHandler.
|
static ValueHandler |
createValueHandler(ORB orb)
Creates the correct ValueHandler.
|
static void |
dprint(Object obj,
String msg) |
static void |
dprint(Object caller,
String msg,
Throwable t) |
void |
dprint(String msg) |
static void |
dprint(String className,
String msg) |
static void |
dprintTrace(Object obj,
String msg) |
static String |
dumpBinary(byte[] data) |
static SystemException |
extractSystemException(Any any) |
static String |
formatStringArray(String[] a) |
static byte[] |
getBuffer(String[] data)
Given some hex data, extract it and put it into a byte buffer.
|
static byte[] |
getByteBufferArray(ByteBuffer byteBuffer) |
static String |
getClassSecurityInfo(Class cl) |
static byte |
getEncodingVersion() |
static byte |
getMaxStreamFormatVersion()
Returns the maximum stream format version supported by our
ValueHandler.
|
static String |
getThreadName(Thread thr) |
static int |
hexOf(char x)
Converts an Ascii Character into Hexadecimal digit
|
static void |
insertSystemException(SystemException ex,
Any any)
Static method for writing a CORBA standard exception to an Any.
|
static void |
intToBytes(int value,
byte[] array,
int offset)
Marshal an integer to a byte array.
|
static boolean |
isForeignORB(ORB orb)
Returns true if it was accurately determined that the remote ORB is
a foreign (non-JavaSoft) ORB.
|
static boolean |
isPrintable(char c) |
static boolean |
isSystemException(String repositoryId)
Return true if this repositoryId is a SystemException.
|
static ClientDelegate |
makeClientDelegate(IOR ior) |
static Object |
makeObjectReference(IOR ior)
This method is used to create untyped object references.
|
static SocketChannel |
openSocketChannel(SocketAddress sa)
Utility method for working around leak in SocketChannel.open( SocketAddress )
method.
|
static String |
operationNameAndRequestId(MessageMediator m) |
static int[] |
parseVersion(String version)
Parse a version string such as "1.1.6" or "jdk1.2fcs" into
a version array of integers {1, 1, 6} or {1, 2}.
|
static void |
popEncVersionFromThreadLocalState() |
static void |
printBuffer(String msg,
ByteBuffer buffer,
PrintStream ps)
Print the contents of the buffer out to the PrintStream in
hex and ASCII.
|
static void |
pushEncVersionToThreadLocalState(byte value) |
static SystemException |
readSystemException(InputStream strm)
Static method for reading a CORBA standard exception from a stream.
|
static String |
repositoryIdOf(String name)
Get the repository id corresponding to a particular class.
|
static void |
setDaemon(Thread thread) |
static void |
throwNotSerializableForCorba(String className)
Throws the CORBA equivalent of a java.io.NotSerializableException
Duplicated from util/Utility for Pure ORB reasons.
|
static void |
writeSystemException(SystemException ex,
OutputStream strm)
Static method for writing a CORBA standard exception to a stream.
|
public static SocketChannel openSocketChannel(SocketAddress sa) throws IOException
IOExceptionpublic static void pushEncVersionToThreadLocalState(byte value)
public static void popEncVersionFromThreadLocalState()
public static byte getEncodingVersion()
public static byte[] getByteBufferArray(ByteBuffer byteBuffer)
public static byte chooseEncodingVersion(ORB orb, IOR ior, GIOPVersion gv)
public static void insertSystemException(SystemException ex, Any any)
any - The Any to write the SystemException into.public static SystemException extractSystemException(Any any)
public static ValueHandler createValueHandler()
public static ValueHandler createValueHandler(ORB orb)
public static boolean isForeignORB(ORB orb)
public static int bytesToInt(byte[] array,
int offset)
array - The array of bytes.offset - The offset from which to start unmarshalling.public static void intToBytes(int value,
byte[] array,
int offset)
array - The array of bytes.offset - The offset from which to start marshalling.public static int hexOf(char x)
public static void writeSystemException(SystemException ex, OutputStream strm)
strm - The OutputStream to use for marshaling.public static SystemException readSystemException(InputStream strm)
strm - The InputStream to use for unmarshaling.public static String classNameOf(String repositoryId)
repositoryId - The repository Id for which we want a class name.public static boolean isSystemException(String repositoryId)
repositoryId - The repository Id to check.public static String repositoryIdOf(String name)
name - The class name of the system exception.public static int[] parseVersion(String version)
public static int compareVersion(int[] v1,
int[] v2)
public static int compareVersion(String v1, String v2)
public void dprint(String msg)
public static String[] concatenateStringArrays(String[] arr1, String[] arr2)
public static void throwNotSerializableForCorba(String className)
public static byte getMaxStreamFormatVersion()
public static ClientDelegate makeClientDelegate(IOR ior)
public static Object makeObjectReference(IOR ior)
public static void setDaemon(Thread thread)
public static String operationNameAndRequestId(MessageMediator m)
public static boolean isPrintable(char c)
public static byte[] getBuffer(String[] data)
public static String dumpBinary(byte[] data)
public static void printBuffer(String msg, ByteBuffer buffer, PrintStream ps)
msg - The message to use as the header for this displaybuffer - The ByteBuffer containing the data. The contents
from 0 to buffer.position() are printed out. Remember to set
position!ps - The PrintStream to use for the display.Copyright © 2017–2019 Eclipse Foundation. All rights reserved.