|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deduced.utilities.ObjectUtilities
public class ObjectUtilities

ObjectUtilities is used to host static utility methods to deal with java objects
| Field Summary | |
|---|---|
private static int |
DEFAULT_READ_ARRAY_SIZE
default read array size when reading an input stream |
| Constructor Summary | |
|---|---|
ObjectUtilities()
|
|
| Method Summary | ||
|---|---|---|
static
|
callCloneOnObject(E valueToClone)
Call the clone method on an object if it exists. |
|
static
|
enlargeArrayIfTooSmall(int size,
T[] sourceArray)
Enlarge an array if it is too small. |
|
static byte[] |
inputStreamToByteArray(java.io.InputStream stream,
int initialSize)
convert an input stream to a byte array |
|
static java.lang.String |
inputStreamToString(java.io.InputStream stream)
convert an input stream to a string |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int DEFAULT_READ_ARRAY_SIZE
| Constructor Detail |
|---|
public ObjectUtilities()
| Method Detail |
|---|
public static <E> E callCloneOnObject(E valueToClone)
E - the type of object to clonevalueToClone - the value to clone
public static java.lang.String inputStreamToString(java.io.InputStream stream)
throws java.io.IOException
stream - the stream to convert
java.io.IOException - if reading fails
public static byte[] inputStreamToByteArray(java.io.InputStream stream,
int initialSize)
throws java.io.IOException
stream - the stream to convertinitialSize - the initial buffer size
java.io.IOException - if reading fails
public static <T> T[] enlargeArrayIfTooSmall(int size,
T[] sourceArray)
T - the type of objects contained in the arraysize - the size the array must containsourceArray - the source array that might be reused if it is large
enough
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||