Read a <code>RuleSet</code> from an <code>InputStream</code>.

@param inputStream
The input-stream containing the rule-set.

@return The rule-set.
328475
public ChangeSet read(final InputStream inputStream) throws SAXException,
                                                           IOException {
        return (ChangeSet) this.parser.read( inputStream );
    }
1027748
public AttributeDataset parse(String name, InputStream stream) throws IOException, ParseException {
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
            return parse(name, null, reader);
        }
    }
107023
public static String readTextFile(InputStream inputStream) {
        InputStreamReader streamReader = new InputStreamReader(inputStream);
        return readTextFile(streamReader);
    }
707498
public void readData(InputStream inputStream) throws IOException {
        if (inputStream == null) {
            return;
        }

        data = ParserUtils.parseBinary(inputStream, (int) size.getValue());
    }
585741
public static Analysis readAnalysis(final InputStream inputStream) throws IOException {
        checkNotNull(inputStream);
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
            return readAnalysis(reader);
        }
    }
1203184
public <T> T read(final InputStream stream, final DataTypeDescriptor<T> descriptor) {
		try {
			return jsonFormat.read(stream, descriptor);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
361898
public static String readString(final InputStream stream) throws IOException {
        InputStreamReader br = null;
        StringBuilder sb = new StringBuilder();
        try {
            br = new InputStreamReader(stream);

            int got;
            while (!Thread.currentThread().isInterrupted()) {
                got = br.read();
                if (got == -1) {
                    break;
                }

                sb.append((char) got);
            }
        } finally {
            if (br != null) {
                try {
                    br.close();
                } catch (final IOException ex) {
                }
            }

        }

        return sb.toString();
    }
473085
public static Study readStudy(final InputStream inputStream) throws IOException {
        checkNotNull(inputStream);
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
            return readStudy(reader);
        }
    }
1258304
public static String inputStreamToString(InputStream in) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(in));
		StringBuffer buffer = new StringBuffer();
		String line;
		while ((line = br.readLine()) != null) {
			buffer.append(line);
		}
		return buffer.toString();
	}
369710
public static Node read(InputStream inputStream) throws XmlException
    {
        try
        {
            DocumentBuilderFactory documentBuilderFactory = 
                DocumentBuilderFactory.newInstance();
            DocumentBuilder documentBuilder = 
                documentBuilderFactory.newDocumentBuilder();
            Document document = documentBuilder.parse(inputStream);
            Node node = document.getDocumentElement();
            return node;
        } 
        catch (ParserConfigurationException canNotHappen)
        {
            // Can not happen with a default configuration
            throw new XmlException("Could not create parser", canNotHappen);
        } 
        catch (SAXException e)
        {
            throw new XmlException("XML parsing error", e);
        }
        catch (IOException e)
        {
            throw new XmlException("IO error while reading XML", e);
        }

    }
922651
public <T> T read(final InputStream stream, final DataTypeDescriptor<T> descriptor)
			throws Exception {
		if (stream == null) throw new NullPointerException("input");
		if (descriptor == null) throw new NullPointerException("descriptor");

		JsonParser parser = factory.createParser(stream);
		return read(parser, descriptor);
	}
135014
public static GTRPublicData read(final InputStream inputStream) throws IOException {
        checkNotNull(inputStream);
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
            return read(reader);
        }
    }
326731
public static String streamToString(InputStream inputStream) {
        Scanner scanner = new Scanner(inputStream);
        String ret = scanner.useDelimiter("\\A").next();
        scanner.close();
        return ret;
    }
1012014
public void load(InputStream inputStream)
	{

		try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)))
		{
			while ((currentLine = reader.readLine()) != null)
			{
				lineNumber++;
				currentLine = currentLine.replaceAll("\\s+", " ").trim();
				matcher = linePattern.matcher(currentLine);

				if (matcher.matches())
				{
					String type = matcher.group("type");
					String data = matcher.group("data");

					switch (type)
					{
						case "v":
							addVertex(data);
							break;
						case "vn":
							addNormal(data);
							break;
						case "vt":
							addUV(data);
							break;
						case "f":
							addFace(data);
							break;
						case "g":
						case "o":
							addShape(data);
							break;

						default:
							MalisisCore.log.debug("[ObjFileImporter] Skipped type {} at line {} : {}", type, lineNumber, currentLine);
							break;
					}
				}
				else
				{
					MalisisCore.log.debug("[ObjFileImporter] Skipped non-matching line {} : {}", lineNumber, currentLine);
				}
			}

			addShape("");
		}
		catch (Exception e)
		{
			MalisisCore.log.error("[ObjFileImporter] An error happened while reading the file : {}", e);
		}
	}
707776
public Formula parse(final InputStream inputStream) throws ParserException {
    if (inputStream == null) {
      return this.f.verum();
    }
    try {
      final CharStream input = CharStreams.fromStream(inputStream);
      this.lexer.setInputStream(input);
      final CommonTokenStream tokens = new CommonTokenStream(this.lexer);
      this.parser.setInputStream(tokens);
      return this.parser.getParsedFormula();
    } catch (final IOException e) {
      throw new ParserException("IO exception when parsing the formula", e);
    } catch (final ParseCancellationException e) {
      throw new ParserException("Parse cancellation exception when parsing the formula", e);
    } catch (final LexerException e) {
      throw new ParserException("Lexer exception when parsing the formula.", e);
    }
  }
1198964
public static BufferedReader getReader(InputStream in, Charset charset) {
		if (null == in) {
			return null;
		}

		InputStreamReader reader = null;
		if (null == charset) {
			reader = new InputStreamReader(in);
		} else {
			reader = new InputStreamReader(in, charset);
		}

		return new BufferedReader(reader);
	}
439780
public static InputStream readResource(String name) {
        String classpath = System.getProperty("java.class.path");
        LOGGER.trace("Reading {} from classpath={}", name, classpath);
        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
        if (classLoader == null) {
            throw new IllegalStateException("Can not obtain classloader instance from current thread");
        }
        return classLoader.getResourceAsStream(name);
    }