}
void writeTypeDescrption(ITypeDescription iTypeDescription) {
if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeTypeDescrption:" + iTypeDescription);
TypeClass typeClass = iTypeDescription.getTypeClass();
if(TypeDescription.isTypeClassSimple(typeClass))
writebyte((byte)typeClass.getValue()); // write the typeclass value
else {
boolean found[] = new boolean[1];
short index;
if(_useCaches)
index = _typeCache.add(found, iTypeDescription.getTypeName());
else
index = (short)0xffff;
writebyte((byte)(typeClass.getValue() | (found[0] ? 0x0 : 0x80))); // write the typeclass value
writeshort(index); // write the cache index
if(!found[0]) // if not found in cache and the type is complex, write the type name
writeString(iTypeDescription.getTypeName());