public InputStream open() { if (read && file != null) { return GFileUtils.openInputStream(file); } if (read || tar.getCurrent() != entry) { throw new UnsupportedOperationException( String.format("The contents of %s has already been read.", this)); } read = true; return tar; }