public static CharStream fromChannel(ReadableByteChannel channel, Charset charset) throws IOException {
		return fromChannel(
			channel,
			DEFAULT_BUFFER_SIZE,
			CodingErrorAction.REPLACE,
			IntStream.UNKNOWN_SOURCE_NAME);
	}
Creates a {@link CharStream} given an opened {@link ReadableByteChannel} and the
charset of the bytes contained in the channel.

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