code: static public Object deserializeArray(InputStream in, Class<?> elemType, int length)
  		throws IOException
  	{
  		if (elemType==null)
  			throw new NullPointerException("elemType");
  		
  		if (length<-1)
  			throw new IllegalArgumentException("length");
  		
  		Object obj = deserialize(in);
  		
  		Class<?> cls = obj.getClass();
  		
  		
  		if (!cls.isArray())
  			throw new InvalidObjectException("object is not an array");
  		
  		Class<?> arrayElemType = cls.getComponentType();
  		if (arrayElemType!=elemType)
  			throw new InvalidObjectException("unexpected array component type");
  				
  		if (length != -1)
  		{
  			int arrayLength = Array.getLength(obj);
  			if (arrayLength!=length)
  				throw new InvalidObjectException("array length mismatch");
  		}
  		
  		return obj;
  	}
docs: Deserializes an array from a given <code>InputStream</code>.
  
  @param in		The <code>InputStream</code> to
  deserialize an object from.
  
  @param elemType	The class denoting the type of the array
  elements.
  @param length	The expected length of the array, or -1 if
  any length is expected.