/*********************************************	Copyright © 2001 Jason Lamport.	All rights reserved.----------------------*******************************************/package com.strangelight.mactoolbox;import com.apple.jdirect.*;import com.apple.mrj.jdirect.*;/** *	Implements JDirect's HandleStruct, using Mac toolbox calls to handle *	getSize() (Note that J_HandleStruct caches the return value of the  *	toolbox call.  If some other object resizes the handle, getSize() *	will subsequently return an incorrect value.) *	 */public class J_HandleStruct extends HandleStruct {	public J_HandleStruct(int new_handle) {		super( new_handle );		handle_size = -1;	}	public int getSize() {		if ( 			( handle_size == -1 )			&& ( handle != 0 )		) {			handle_size = MemoryFunctions.GetHandleSize( handle );		}		return handle_size;	}		protected int handle_size;	}