/** * Checks whether a given rect is inside the raster, throws an exception if outside. * * @param x * The x position of the rect. * @param y * The y position of the rect. * @param width * The width of the rect. * @param height * The height of the rect. * @throws IndexOutOfBoundsException * if the given rect is outside the raster */ protected final void checkBoundsEx( int x, int y, int width, int height ) throws IndexOutOfBoundsException { if ( !checkBounds( x, y, width, height ) ) { throw new IndexOutOfBoundsException( "request out of bounds" ); } }