private void readFile(StlFileParser parser) {
		int t;

		try {
			parser.nextToken();
		} catch (IOException e) {
			System.err.println("IO Error on line " + parser.lineno() + ": "
					+ e.getMessage());
			System.err.println("File seems to be empty");
			return; // ????? Throw ?????
		}

		// Here we try to detect what kind of file it is (see readSolid)
		readSolid(parser);

		if (getAscii()) { // Ascii file
			try {
				parser.nextToken();
			} catch (IOException e) {
				System.err.println("IO Error on line " + parser.lineno() + ": "
						+ e.getMessage());
			}

			// Read all the facets of the object
			while (parser.ttype != StlFileParser.TT_EOF
					&& !parser.sval.equals("endsolid")) {
				readFacet(parser);
				try {
					parser.nextToken();
				} catch (IOException e) {
					System.err.println("IO Error on line " + parser.lineno()
							+ ": " + e.getMessage());
				}
			}// End while

			// Why are we out of the while?: EOF or endsolid
			if (parser.ttype == StlFileParser.TT_EOF)
				System.err.println("Format Error:expecting 'endsolid', line "
						+ parser.lineno());
			else {
				if (DEBUG == 1)
					System.out.println("File readed");
			}
		}// End of Ascii reading

		else { // Binary file
			try {
				readBinaryFile(getFileName());
			} catch (IOException e) {
				System.err.println("Format Error: reading the binary file");
			}
		}// End of binary file
	}// End of readFile