|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.util.Util
This class defines utility methods.
Field Summary | |
static Object |
NULL_OBJECT
A null object. |
Method Summary | |
static Component |
getComponentByName(ContentController cc,
String name)
Retrieves the sub component with the specified name from the content of a composite. |
static byte[] |
readExternalByteArray(DataInput in)
Reads and returns an array of bytes from an ObjectInput
object. |
static int[] |
readExternalIntArray(DataInput in)
Reads and returns an array of integer from a DataInput
object. |
static long[] |
readExternalLongArray(DataInput in)
Reads and returns an array of long from a DataInput object. |
static Object |
readObject(ObjectInput input)
Read the given object from the given ObjectInput . |
static void |
writeExternalByteArray(DataOutput out,
byte[] array)
Writes an array of bytes on a DataOutput object.
|
static void |
writeExternalIntArray(DataOutput out,
int[] array)
Writes an array of integer on a DataOutput object.
|
static void |
writeExternalLongArray(DataOutput out,
long[] array)
Writes an array of long on a DataOutput object.
|
static void |
writeObject(ObjectOutput output,
Object o)
Write the given object on the given ObjectOutput . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object NULL_OBJECT
Method Detail |
public static Component getComponentByName(ContentController cc, String name)
cc
- the content controller of the composite.name
- the name of the component to be retrieved.
null
if no
component with the specified name exists.public static void writeExternalByteArray(DataOutput out, byte[] array) throws IOException
DataOutput
object.
Note: if the array is null
,-1
is
written.
out
- the output on which to write.array
- the arary to write.
IOException
- if an error occurs.public static byte[] readExternalByteArray(DataInput in) throws IOException
ObjectInput
object.
in
- the input from which to read.
IOException
- if an error occurs.public static void writeExternalIntArray(DataOutput out, int[] array) throws IOException
DataOutput
object.
Note: if the array is null
,-1
is
written.
out
- the ObjectOutput
on which to write.array
- the arary to write.
IOException
- if an error occurs.public static int[] readExternalIntArray(DataInput in) throws IOException
DataInput
object.
in
- the ObjectInput
from which to read.
IOException
- if an error occurs.public static void writeExternalLongArray(DataOutput out, long[] array) throws IOException
DataOutput
object.
Note: if the array is null
,-1
is
written.
out
- the ObjectOutput
on which to write.array
- the arary to write.
IOException
- if an error occurs.public static long[] readExternalLongArray(DataInput in) throws IOException
DataInput
object.
in
- the ObjectInput
from which to read.
IOException
- if an error occurs.public static void writeObject(ObjectOutput output, Object o) throws IOException
ObjectOutput
. If the given
output is an ObjectOutputStream
, then use the
ObjectOutputStream.writeUnshared(Object)
method, else use the
normal ObjectOutput.writeObject(Object)
method.
IOException
ObjectOutput.writeObject(Object)
public static Object readObject(ObjectInput input) throws IOException, ClassNotFoundException
ObjectInput
. If the given
input is an ObjectInputStream
, then use the
ObjectInputStream.readUnshared()
method, else use the normal
ObjectInput.readObject()
method.
IOException
ClassNotFoundException
ObjectInput.readObject()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |