public void loadFromReader(TSLReader reader) throws InvalidTSLException, IOException
  {
    clear();

    if(reader.getState() != TSLReader.State.OBJECT)
    {
      throw new IllegalStateException("Current value is not a TSL Object");
    }
    while(true)
    {
      reader.moveNext();

      switch(reader.getState())
      {
        case STRING:
          putString(reader.getName(), reader.getString());
          break;
        case OBJECT:
          putObject(reader.getName(), new TSLObject(reader));
          break;
        case ENDOBJECT:
          return;
        default:
          assert false;
      }
    }
  }