title: Creating object and reading from file
body: <p>I have an object and I can create it with two constructors</p>
  
  <pre><code>public Brick(int x, int y){
      ..........
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>public Brick(int x, int y, float sizeX, float sizeY){
  
  }
  </code></pre>
  
  <p>In my map.txt I have this </p>
  
  <pre><code>Brick 320 0
  Brick 640 64 64 128
  Spike 5 12
  Spike 75 25
  ...
  ...
  ...
  </code></pre>
  
  <p>and here how I read that file</p>
  
  <pre><code>        FileHandle file = Gdx.files.internal("data/map.txt");
          StringTokenizer tokens = new StringTokenizer(file.readString());
          while(tokens.hasMoreTokens()){
              String type = tokens.nextToken();
              if(type.equals("Block")){
                  list.add(new Brick(Integer.parseInt(tokens.nextToken()), Integer.parseInt(tokens.nextToken()), Float.parseFloat(tokens.nextToken()), Float.parseFloat(tokens.nextToken())));
              }
  </code></pre>
  
  <p>so I need to read my file that both of my constructors would work?</p>