| Modifier and Type | Field and Description |
|---|---|
| public static final byte[] | EMPTY_BYTE_ARRAY
An instance of an empty byte array. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static < The type of the array cells T> List | Returns: a read-only listThe array to turn into a read-only list array)Make the contents of an array available as a read-only list. |
| public static < The type of the array cells T> T[] | Returns: a copy of the arrayThe original array to copy original)Copy an array of objects; the original array could be null |
| public static boolean[] | Returns: a copy of the arrayThe original array to copy original)Copy a (possibly null) array of booleans |
| public static byte[] | Returns: a copy of the arrayThe original array to copy original)Copy a (possibly null) array of bytes |
| public static int[] | Returns: a copy of the arrayThe original array to copy original)Copy a (possibly null) array of ints |
| public static long[] | Returns: a copy of the arrayThe original array to copy original)Copy a (possibly null) array of longs |
| public static int[][] | Returns: a copy of the arrayThe original array to copy original)Copy a (possibly null) 2-dimensional array of ints |
| public static void | readArrayItems(ObjectInput
Input stream in, Object[] array to read into a)Read an array of objects out of a stream. |
| public static int | Returns: length of the array of objectsInput stream. in)Read the length of an array of objects in an object stream. |
| public static boolean[] | Returns: the array of integers.the ObjectInput. in)Read an array of integers from an ObjectInput. |
| public static int[] | Returns: the array of integers.the ObjectInput. in)Read an array of integers from an ObjectInput. |
| public static int[][] | |
| public static long[] | Returns: the array of integers.the ObjectInput. in)Read an array of integers from an ObjectInput. |
| public static Object[] | Returns: the array of objectsInput stream in)Reads an array of objects from the stream. |
| public static String[] | Returns: the array of integers.the ObjectInput. in)Read an array of strings from an ObjectInput. |
| public static String | |
| public static void | writeArray(ObjectOutput
Object output stream to write to. out, Object[] array of objects to write. a)Write an array of objects and length to an output stream. |
| public static void | writeArrayItems(ObjectOutput
Object output stream to write to. out, Object[] array of objects to write. a)Write an array of objects to an output stream. |
| public static void | writeArrayLength(ObjectOutput
ObjectOutput stream out, Object[] array of objects whose length should be written. a)Write the length of an array of objects to an output stream. |
| public static void | writeBooleanArray(ObjectOutput
the ObjectOutput. out, boolean[] the array. a)Write an array of booleans to an ObjectOutput. |
| public static void | writeIntArray(ObjectOutput
the ObjectOutput. out, int[] the array. a)Write an array of integers to an ObjectOutput. |
| public static void | |
| public static void | writeLongArray(ObjectOutput
the ObjectOutput. out, long[] the array. a)Write an array of longs to an ObjectOutput. |
| EMPTY_BYTE_ARRAY | back to summary |
|---|---|
| public static final byte[] EMPTY_BYTE_ARRAY An instance of an empty byte array. Since empty arrays are immutable, this instance can safely be shared. Code that needs an empty byte array can use this static instance instead of allocating a new one. | |
| ArrayUtil | back to summary |
|---|---|
| public ArrayUtil() | |
| asReadOnlyList | back to summary |
|---|---|
| public static <T> List Make the contents of an array available as a read-only list. If the array is null, an empty list will be returned.
| |
| copy | back to summary |
|---|---|
| public static <T> T[] copy(T[] original) Copy an array of objects; the original array could be null
| |
| copy | back to summary |
|---|---|
| public static boolean[] copy(boolean[] original) Copy a (possibly null) array of booleans
| |
| copy | back to summary |
|---|---|
| public static byte[] copy(byte[] original) Copy a (possibly null) array of bytes
| |
| copy | back to summary |
|---|---|
| public static int[] copy(int[] original) Copy a (possibly null) array of ints
| |
| copy | back to summary |
|---|---|
| public static long[] copy(long[] original) Copy a (possibly null) array of longs
| |
| copy2 | back to summary |
|---|---|
| public static int[][] copy2(int[][] original) Copy a (possibly null) 2-dimensional array of ints
| |
| readArrayItems | back to summary |
|---|---|
| public static void readArrayItems(ObjectInput in, Object[] a) throws IOException, ClassNotFoundException Read an array of objects out of a stream.
| |
| readArrayLength | back to summary |
|---|---|
| public static int readArrayLength(ObjectInput in) throws IOException Read the length of an array of objects in an object stream.
| |
| readBooleanArray | back to summary |
|---|---|
| public static boolean[] readBooleanArray(ObjectInput in) throws IOException Read an array of integers from an ObjectInput. This allocates the array.
| |
| readIntArray | back to summary |
|---|---|
| public static int[] readIntArray(ObjectInput in) throws IOException Read an array of integers from an ObjectInput. This allocates the array.
| |
| readInts | back to summary |
|---|---|
| public static int[][] readInts(ObjectInput in) throws IOException, ClassNotFoundException | |
| readLongArray | back to summary |
|---|---|
| public static long[] readLongArray(ObjectInput in) throws IOException Read an array of integers from an ObjectInput. This allocates the array.
| |
| readObjectArray | back to summary |
|---|---|
| public static Object[] readObjectArray(ObjectInput in) throws IOException, ClassNotFoundException Reads an array of objects from the stream.
| |
| readStringArray | back to summary |
|---|---|
| public static String[] readStringArray(ObjectInput in) throws IOException, ClassNotFoundException Read an array of strings from an ObjectInput. This allocates the array.
| |
| toString | back to summary |
|---|---|
| public static String toString(int[] value) | |
| writeArray | back to summary |
|---|---|
| public static void writeArray(ObjectOutput out, Object[] a) throws IOException Write an array of objects and length to an output stream. Does equivalent of writeArrayLength() followed by writeArrayItems()
| |
| writeArrayItems | back to summary |
|---|---|
| public static void writeArrayItems(ObjectOutput out, Object[] a) throws IOException Write an array of objects to an output stream.
| |
| writeArrayLength | back to summary |
|---|---|
| public static void writeArrayLength(ObjectOutput out, Object[] a) throws IOException Write the length of an array of objects to an output stream. The length
| |
| writeBooleanArray | back to summary |
|---|---|
| public static void writeBooleanArray(ObjectOutput out, boolean[] a) throws IOException Write an array of booleans to an ObjectOutput. This writes the array in a format readBooleanArray understands.
| |
| writeIntArray | back to summary |
|---|---|
| public static void writeIntArray(ObjectOutput out, int[] a) throws IOException Write an array of integers to an ObjectOutput. This writes the array in a format readIntArray understands.
| |
| writeInts | back to summary |
|---|---|
| public static void writeInts(ObjectOutput out, int[][] val) throws IOException | |
| writeLongArray | back to summary |
|---|---|
| public static void writeLongArray(ObjectOutput out, long[] a) throws IOException Write an array of longs to an ObjectOutput. This writes the array in a format readLongArray understands.
| |