public static CharStream fromStream(InputStream is, Charset charset) throws IOException {
		return fromStream(is, charset, -1);
	}
Creates a {@link CharStream} given an opened {@link InputStream} and the
charset of the bytes contained in the stream.

Reads the entire contents of the {@code InputStream} into
the result before returning, then closes the {@code InputStream}.
runtime/Java/src/org/antlr/v4/runtime/CharStreams.java