Lines Matching full:dimensions
55 int[] dimensions = new int[depth];
56 dimensions[0] = Array.getLength(array);
57 if (depth > 1) collectDimensions(array, 1, dimensions);
58 return dimensions;
61 private void collectDimensions (Object array, int dimension, int[] dimensions) {
62 boolean elementsAreArrays = dimension < dimensions.length - 1;
66 dimensions[dimension] = Math.max(dimensions[dimension], Array.getLength(element));
67 if (elementsAreArrays) collectDimensions(element, dimension + 1, dimensions);
76 int[] dimensions = new int[dimensionCount];
78 dimensions[i] = data.getInt();
88 T array = (T)Array.newInstance(elementClass, dimensions);
89 readArray(elementSerializer, elementClass, data, array, 0, dimensions);
99 int[] dimensions = getDimensions(object);
100 buffer.put((byte)dimensions.length);
101 for (int dimension : dimensions) buffer.putInt(dimension);
110 writeArray(elementSerializer, buffer, object, 0, dimensions.length);
133 private void readArray (Serializer elementSerializer, Class elementClass, ByteBuffer buffer, Object array, int dimension, int[] dimensions) throws IOException {
134 boolean elementsAreArrays = dimension < dimensions.length - 1;
137 length = dimensions[0];
145 if (element != null) readArray(elementSerializer, elementClass, buffer, element, dimension + 1, dimensions);