@Override
		public String getText(Interval interval) {
			int startIdx = Math.min(interval.a, size);
			int len = Math.min(interval.b - interval.a + 1, size - startIdx);

			// We know the maximum code point in byteArray is U+00FF,
			// so we can treat this as if it were ISO-8859-1, aka Latin-1,
			// which shares the same code points up to 0xFF.
			return new String(byteArray, startIdx, len, StandardCharsets.ISO_8859_1);
		}
Return the UTF-16 encoded string for the given interval
runtime/Java/src/org/antlr/v4/runtime/CodePointCharStream.java