public final static Map<Integer, Path> readExternals(final InputStream in)
			throws IOException {
		final Map<Integer, Path> map = new HashMap<>();
		if (in != null) {
			while (true) {
				final IntegerPointer available = new IntegerPointer(
						in.available());
				if (available.isZero()) {
					break;
				}
				while (available.greaterZero()) {
					final Integer idPrev = readInt(in, available);
					final Integer id = readInt(in, available);
					final String name = readName(in, available);
					final Path p;
					if (idPrev == 0) {
						p = getPath(name);
					} else {
						p = map.get(idPrev).resolve(name);
					}
					map.put(id, p);
				}
			}
		}
		if (map.isEmpty()) {
			map.put(-1, null);
		}
		return map;
	}