code: public static long getLength(ValueData value, int propType)
     {
        if (propType == PropertyType.BINARY)
        {
           return value.getLength();
        }
        else if (propType == PropertyType.NAME || propType == PropertyType.PATH)
        {
           return -1;
        }
        else
        {
           return value.toString().length();
        }
     }
docs: Returns length of the internal value.
  
  @param value a value.
  @param propType
  @return the length of the internal value or <code>-1</code> if the length
  cannot be determined.